I use Rails 2.2.2 with sqlite3 3.5.6 under Vista.
Firstly I created a table without id, but later I found it
wasn't good idea and I wanted to add id column with migration:
class AddIdToPersonRelation < ActiveRecord::Migration def
self.up
add_column :person_relations, :id, :integer
end
def self.down
remove_column :person_relations, :id
end end
Then I run migration: rake db:migrate And I found that Rails
didn't set id field as primary key, so when I added something to
the table, id was set to nil. It wasn't what I expected.
Then I run: rake db:schema:load And it created all tables again
and person_relations table had correct primary key.
I think that both methods (db:migrate and db:schema:load) should
give the same results.
Maybe I am wrong (I am new in ruby and rails).