X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/8598db3233baefa9e455da331ca2579a8df17709..d593d3d2dd6986aa07f5d5268d3e0d7b808590db:/db/migrate/20140507110937_create_changeset_comments.rb diff --git a/db/migrate/20140507110937_create_changeset_comments.rb b/db/migrate/20140507110937_create_changeset_comments.rb index 8d2a4599d..d4475b4d8 100644 --- a/db/migrate/20140507110937_create_changeset_comments.rb +++ b/db/migrate/20140507110937_create_changeset_comments.rb @@ -1,17 +1,17 @@ -require 'migrate' +require "migrate" -class CreateChangesetComments < ActiveRecord::Migration +class CreateChangesetComments < ActiveRecord::Migration[5.0] def change create_table :changeset_comments do |t| t.column :changeset_id, :bigint, :null => false - t.column :author_id, :bigint, :null => false + t.column :author_id, :bigint, :null => false t.text :body, :null => false t.timestamp :created_at, :null => false t.boolean :visible, :null => false end - add_foreign_key :changeset_comments, [:changeset_id], :changesets, [:id] - add_foreign_key :changeset_comments, [:author_id], :users, [:id] + add_foreign_key :changeset_comments, :changesets, :name => "changeset_comments_changeset_id_fkey" + add_foreign_key :changeset_comments, :users, :column => :author_id, :name => "changeset_comments_author_id_fkey" add_index :changeset_comments, :created_at end