diff options
author | Stan Hu <stanhu@gmail.com> | 2017-03-15 08:33:31 +0300 |
---|---|---|
committer | DJ Mountney <david@twkie.net> | 2017-03-15 08:36:49 +0300 |
commit | c0c5a0599912782bff684edfccb7d006fb54bb2f (patch) | |
tree | 1c9553b7152d08db5e7a704d6e68ae146f6339fa /db | |
parent | 068fe61581b4a67633dcb3f3cbc7b756d59f0d5e (diff) |
Merge branch 'fix-migration-rc1-rollback' into 'master'
Fixing two migrations that could not be rolled back
See merge request !9953
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170216141440_drop_index_for_builds_project_status.rb | 2 | ||||
-rw-r--r-- | db/migrate/20170305203726_add_owner_id_foreign_key.rb | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/db/migrate/20170216141440_drop_index_for_builds_project_status.rb b/db/migrate/20170216141440_drop_index_for_builds_project_status.rb index 906711b9f3f..a2839f52d89 100644 --- a/db/migrate/20170216141440_drop_index_for_builds_project_status.rb +++ b/db/migrate/20170216141440_drop_index_for_builds_project_status.rb @@ -3,6 +3,6 @@ class DropIndexForBuildsProjectStatus < ActiveRecord::Migration DOWNTIME = false def change - remove_index(:ci_commits, [:gl_project_id, :status]) + remove_index(:ci_commits, column: [:gl_project_id, :status]) end end diff --git a/db/migrate/20170305203726_add_owner_id_foreign_key.rb b/db/migrate/20170305203726_add_owner_id_foreign_key.rb index 3eece0e2eb5..5fbdc45f1a7 100644 --- a/db/migrate/20170305203726_add_owner_id_foreign_key.rb +++ b/db/migrate/20170305203726_add_owner_id_foreign_key.rb @@ -5,7 +5,11 @@ class AddOwnerIdForeignKey < ActiveRecord::Migration disable_ddl_transaction! - def change + def up add_concurrent_foreign_key :ci_triggers, :users, column: :owner_id, on_delete: :cascade end + + def down + remove_foreign_key :ci_triggers, column: :owner_id + end end |