summaryrefslogtreecommitdiff
path: root/db/post_migrate
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-09-07 14:11:49 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-09-07 14:11:49 +0300
commitd931cac7a3df2c890f3bd7a98aaa59947f460e42 (patch)
tree7e0195a5fec0a86168b84538e5a854d4b9ad6b0f /db/post_migrate
parent4d23da68b2bc8b13026e663e607d6c25afd51aeb (diff)
downloadgitlab-ce-dz-rebuild-schema.tar.gz
Update schema.rb from db:migrate and fix invalid index checkdz-rebuild-schema
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'db/post_migrate')
-rw-r--r--db/post_migrate/20170503004427_update_retried_for_ci_build.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/post_migrate/20170503004427_update_retried_for_ci_build.rb b/db/post_migrate/20170503004427_update_retried_for_ci_build.rb
index 3a4d6c4916b..9d9f36550e7 100644
--- a/db/post_migrate/20170503004427_update_retried_for_ci_build.rb
+++ b/db/post_migrate/20170503004427_update_retried_for_ci_build.rb
@@ -54,14 +54,14 @@ class UpdateRetriedForCiBuild < ActiveRecord::Migration
def with_temporary_partial_index
if Gitlab::Database.postgresql?
- unless index_exists?(:ci_builds, name: :index_for_ci_builds_retried_migration)
+ unless index_exists?(:ci_builds, :id, name: :index_for_ci_builds_retried_migration)
execute 'CREATE INDEX CONCURRENTLY index_for_ci_builds_retried_migration ON ci_builds (id) WHERE retried IS NULL;'
end
end
yield
- if Gitlab::Database.postgresql? && index_exists?(:ci_builds, name: :index_for_ci_builds_retried_migration)
+ if Gitlab::Database.postgresql? && index_exists?(:ci_builds, :id, name: :index_for_ci_builds_retried_migration)
execute 'DROP INDEX CONCURRENTLY index_for_ci_builds_retried_migration'
end
end