Forum: Ruby on Rails String ID -> schema.rb incorrect?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dce423ecab2c62f58c9660e4df0471ed?d=identicon&s=25 Martin Vielsmaier (Guest)
on 2009-03-01 11:27
(Received via mailing list)
Hi,

I made one of my ID columns a string, because I don't want my IDs to
be guessable (I use a md5 hash of some system parameters with
rehashing in case of collisions.)

My migration reads:
...
change_column :users, :id, :string
change_column :comments, :user_id, :string

Afterwards executing this my db/schema.rb looks like this:
...
create_table "comments", :force => true do |t|
    t.integer  "commentable_id"
    t.string   "commentable_type"
    t.string   "user_id"
    t.datetime "date"
    t.text     "body"
end
#so far so good
...
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

hmm, I consider it a bug, because running the migrations and loading
the schema from schema.rb lead to different schemas.
What do you think?
This topic is locked and can not be replied to.