datamapper/dm-migrations — pull request #50 by avillagran (2013-02-01 21:36:33+00:00)
Title: Foreign Key request

Hi!

I added Foreign Key creation, some examples:

migration 1, :create_people_table do
up do
create_table :jobs do
column :id, Integer, :serial => true
column :name, String
end
create_table :people do
column :id, Integer, :serial => true
column :desc, String
column :job_id
end

modify_table :people do
add_foreign_key :job_id, :jobs
end
end

down do
modify_table :people do
drop_foreign_key :jobs
end
end
end