]> git.openstreetmap.org Git - rails.git/blob - db/migrate/030_add_foreign_keys.rb
Remove lib prefix from includes for ruby 1.9 compatibility
[rails.git] / db / migrate / 030_add_foreign_keys.rb
1 require '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 ActiveRecord::IrreversibleMigration
13   end
14 end