X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f9fee045acc2f5e3befd11ef93e26e37f9fd0c2a..77e8a16a153752b919a9153c1c9ded9834d387f7:/db/migrate/030_add_foreign_keys.rb diff --git a/db/migrate/030_add_foreign_keys.rb b/db/migrate/030_add_foreign_keys.rb index eba44cfad..54820aab1 100644 --- a/db/migrate/030_add_foreign_keys.rb +++ b/db/migrate/030_add_foreign_keys.rb @@ -1,14 +1,14 @@ -require 'lib/migrate' +require "migrate" 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] + add_foreign_key :changeset_tags, :changesets, :column => :id, :name => "changeset_tags_id_fkey" + add_foreign_key :diary_comments, :diary_entries, :name => "diary_comments_diary_entry_id_fkey" + add_foreign_key :gps_points, :gpx_files, :column => :gpx_id, :name => "gps_points_gpx_id_fkey" + add_foreign_key :gpx_file_tags, :gpx_files, :column => :gpx_id, :name => "gpx_file_tags_gpx_id_fkey" end def self.down - raise IrreversibleMigration.new + fail ActiveRecord::IrreversibleMigration end end