Hi,
I started a project on Ruby on Rails some time ago when the migration feature wasn't part of Rails. I used to have one big SQL file that creates the whole database and adds the foreign constraints. They looked like that:
CONSTRAINT FK_users_countries FOREIGN KEY FK_users_countries (country_id) REFERENCES countries(country_id) ON DELETE RESTRICT ON UPDATE RESTRICT
Now I want to use migration features so I used
rake db:schema:dump
When I look at the schema.rb file i don't like what i see ;(. All the tables are there but the are no primary keys and also there are no Foreign Keys.
My question is can i use the ruby way to create foreign keys? And why
rake db:schema:dump
doesn't work?
Nikola