diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /db/migrate/20210720140841_create_postgres_async_indexes_table.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'db/migrate/20210720140841_create_postgres_async_indexes_table.rb')
-rw-r--r-- | db/migrate/20210720140841_create_postgres_async_indexes_table.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/db/migrate/20210720140841_create_postgres_async_indexes_table.rb b/db/migrate/20210720140841_create_postgres_async_indexes_table.rb index 707367e5f6c..99025149840 100644 --- a/db/migrate/20210720140841_create_postgres_async_indexes_table.rb +++ b/db/migrate/20210720140841_create_postgres_async_indexes_table.rb @@ -3,7 +3,7 @@ class CreatePostgresAsyncIndexesTable < ActiveRecord::Migration[6.1] include Gitlab::Database::MigrationHelpers - def change + def up create_table_with_constraints :postgres_async_indexes do |t| t.timestamps_with_timezone null: false @@ -18,4 +18,10 @@ class CreatePostgresAsyncIndexesTable < ActiveRecord::Migration[6.1] t.index :name, unique: true end end + + def down + with_lock_retries do + drop_table :postgres_async_indexes + end + end end |