问题
In Rails 3 ActiveRecord create_table is it possible to include the option :id => false. For example
create_table :posts, :id => false do |t|
...
end
but is it possible to remove the :id column on an existing table in a subsequent up migration?
回答1:
You should be able to remove the column just like any other non-id column:
remove_column :posts, :id
来源:https://stackoverflow.com/questions/8394253/is-there-a-way-to-remove-the-id-column-in-a-subsequent-rails-3-activerecord-migr