Commit e4a9b8a9 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Move foreign key to separate migration

parent b626869f
......@@ -5,6 +5,5 @@ class AddOwnerIdToTriggers < ActiveRecord::Migration
def change
add_column :ci_triggers, :owner_id, :integer
add_foreign_key :ci_triggers, :users, column: :owner_id, on_delete: :cascade
end
end
class AddOwnerIdForeignKey < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def change
add_concurrent_foreign_key :ci_triggers, :users, column: :owner_id, on_delete: :cascade
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170217151949) do
ActiveRecord::Schema.define(version: 20170305203726) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -1335,7 +1335,7 @@ ActiveRecord::Schema.define(version: 20170217151949) do
add_index "web_hooks", ["project_id"], name: "index_web_hooks_on_project_id", using: :btree
add_foreign_key "boards", "projects"
add_foreign_key "ci_triggers", "users", column: "owner_id", on_delete: :cascade
add_foreign_key "ci_triggers", "users", column: "owner_id", name: "fk_e8e10d1964", on_delete: :cascade
add_foreign_key "issue_metrics", "issues", on_delete: :cascade
add_foreign_key "label_priorities", "labels", on_delete: :cascade
add_foreign_key "label_priorities", "projects", on_delete: :cascade
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment