diff options
Diffstat (limited to 'db/migrate/20170919211300_remove_temporary_ci_builds_index.rb')
-rw-r--r-- | db/migrate/20170919211300_remove_temporary_ci_builds_index.rb | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/db/migrate/20170919211300_remove_temporary_ci_builds_index.rb b/db/migrate/20170919211300_remove_temporary_ci_builds_index.rb deleted file mode 100644 index 23c94a809d4..00000000000 --- a/db/migrate/20170919211300_remove_temporary_ci_builds_index.rb +++ /dev/null @@ -1,28 +0,0 @@ -# See http://doc.gitlab.com/ce/development/migration_style_guide.html -# for more information on how to write migrations for GitLab. - -class RemoveTemporaryCiBuildsIndex < ActiveRecord::Migration[4.2] - include Gitlab::Database::MigrationHelpers - - # Set this constant to true if this migration requires downtime. - DOWNTIME = false - - # To use create/remove index concurrently - disable_ddl_transaction! - - def up - return unless index_exists?(:ci_builds, :id, name: 'index_for_ci_builds_retried_migration') - - remove_concurrent_index(:ci_builds, :id, name: "index_for_ci_builds_retried_migration") - end - - def down - # this was a temporary index for a migration that was never - # present previously so this probably shouldn't be here but it's - # easier to test the drop if we have a way to create it. - add_concurrent_index("ci_builds", ["id"], - name: "index_for_ci_builds_retried_migration", - where: "(retried IS NULL)", - using: :btree) - end -end |