]> git.openstreetmap.org Git - rails.git/blob - db/migrate/030_add_foreign_keys.rb
Silly YAML and its subtly different parsers. This worked in Syck/LibYAML in Perl...
[rails.git] / db / migrate / 030_add_foreign_keys.rb
1 require 'lib/migrate'
2
3 class AddForeignKeys < ActiveRecord::Migration
4   def self.up
5     add_foreign_key :changeset_tags, [:id], :changesets
6     add_foreign_key :diary_comments, [:diary_entry_id], :diary_entries, [:id]
7     add_foreign_key :gps_points, [:gpx_id], :gpx_files, [:id]
8     add_foreign_key :gpx_file_tags, [:gpx_id], :gpx_files, [:id]
9   end
10
11   def self.down
12     raise IrreversibleMigration.new
13   end
14 end