diff options
author | Stan Hu <stanhu@gmail.com> | 2017-03-15 05:33:31 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-03-15 05:33:31 +0000 |
commit | 253b61d2a03fe04877cedb88260dbb69f59e7e89 (patch) | |
tree | f218a27f0d9d523d05f79c393126c2cffac02e52 /db | |
parent | 8fddde5b9f97feaa0c62f8c4a3e5441d20989165 (diff) | |
parent | fbbaff4a7141fbecca08e087f923c700290a6a74 (diff) | |
download | gitlab-ce-253b61d2a03fe04877cedb88260dbb69f59e7e89.tar.gz |
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 |