This project is archived and is in readonly mode.

#2116 ✓stale
Martin Vielsmaier

Changing id column to string "breaks" schema.rb

Reported by Martin Vielsmaier | March 3rd, 2009 @ 08:21 AM | in 3.x

When you change the datatype of your id column with a migration like

change_column :users, :id, :string

your schema.rb will not contain this column:

...
create_table "users", :force => true do |t|
  t.string   "email"
  t.string   "pwd_hash"
  t.boolean  "is_active"
  t.datetime "last_activity"
  t.string   "pwd_salt"
  t.string   "activation_key"
  t.datetime "signup_date"
end 

So you will end up with

rake db:migrate

and

rake db:schema:load

creating different schemas.

Same behavior when your create a table with

create_table :objects, :id => false do |t|
  t.string :id
end

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Pages