X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e660e609661edadc1ed5ad49d6e83e936b2f91cd..d3e91a79ff3ab35006b233d39e059ffa406ba443:/db/migrate/030_add_foreign_keys.rb?ds=inline diff --git a/db/migrate/030_add_foreign_keys.rb b/db/migrate/030_add_foreign_keys.rb index e3dc7e82d..d55c96380 100644 --- a/db/migrate/030_add_foreign_keys.rb +++ b/db/migrate/030_add_foreign_keys.rb @@ -1,11 +1,11 @@ -require 'migrate' +require "migrate" -class AddForeignKeys < ActiveRecord::Migration +class AddForeignKeys < ActiveRecord::Migration[5.0] 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