activerecord - Create missing auto increment attribute with rails migration -


I am writing a migration to convert a non-rail app to the right format for rail - for some One reason for the tables is not the automatic incremental salary set on the ID column. Is it possible to run in the migration, maybe change_column or something else?

You need to execute an SQL statement.

  statement = "ALTER TABLE" user 'change ID id / SML LINT (5) unknown unknown endonantement "ActiveRecord:: Base.connection.execute (statement)  

Note that this is just an example. The last SQL statement depends on the syntax database.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -