Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

auto_increment on create_table option is not included on schema.rb

#2879

For some reason I have to use on a migration an special primary key.

create_table :articles, :primary_key => :my_special_id do |t|
  t.integer :my_special_id
  t.string :title
end

The schema.rb generated is not what I expect because the primary_key is not included.

create_table "articles", :id => false, :force => true do |t|
  t.integer "my_special_id", :null => false
  t.string "title"
end

This will make the application break if we run rake db:schema:load, the recomended way to generate an initial database, instead of the rake db:migrate.

Reported by Francesc Esplugas · July 7th, 2009 @ 01:14 PM

State: duplicate
Milestone: 2.x
Assigned to: nobody
Importance: none