E
E
eldar_web2014-12-01 11:24:38
Ruby on Rails
eldar_web, 2014-12-01 11:24:38

In Ruby on Rails, when creating a new record in a table, the id column is not created automatically (there is no auto and primary key), what migration should I create?

How to fix the current table (which migration to create or something) if when creating a new record id creates nothing (nil)???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Krasnodemsky, 2014-12-01
@Prognosticator

rails generate migration AddIndexToYourField your_index_field:string:index

or in migration
read here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question