Add yet more foreign keys.
This commit is contained in:
parent
cd4fb9d44c
commit
a0a6dd3619
1 changed files with 12 additions and 0 deletions
12
db/migrate/030_add_foreign_keys.rb
Normal file
12
db/migrate/030_add_foreign_keys.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
class AddForeignKeys < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_foreign_key :changeset_tags, [:id], :changesets
|
||||
add_foreign_key :diary_comments, [:diary_entry_id], :diary_entries, [:id]
|
||||
add_foreign_key :gps_points, [:gpx_id], :gpx_files, [:id]
|
||||
add_foreign_key :gpx_file_tags, [:gpx_id], :gpx_files, [:id]
|
||||
end
|
||||
|
||||
def self.down
|
||||
raise IrreversibleMigration.new
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue