diff options
| author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-03-21 14:47:10 +0000 |
|---|---|---|
| committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-03-21 14:47:10 +0000 |
| commit | 9b4a1db997119920cb29d9739f27c3350dfcb81a (patch) | |
| tree | 16a4e405bc152460247a659d2979bed9da22fbbe /doc | |
| parent | 30c480c2b3f4709f592d8b095f8653df940f6845 (diff) | |
| parent | c914883a2b350bb53313df3eb97e6e0064d9f655 (diff) | |
| download | gitlab-ce-9b4a1db997119920cb29d9739f27c3350dfcb81a.tar.gz | |
Merge branch 'ab-43887-concurrent-migration-helpers' into 'master'
Convenient use of concurrent migration helpers
Closes #43887
See merge request gitlab-org/gitlab-ce!17888
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/development/migration_style_guide.md | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md index 243ac7f0c98..1e060ffd941 100644 --- a/doc/development/migration_style_guide.md +++ b/doc/development/migration_style_guide.md @@ -136,11 +136,14 @@ class MyMigration < ActiveRecord::Migration disable_ddl_transaction! def up - remove_concurrent_index :table_name, :column_name if index_exists?(:table_name, :column_name) + remove_concurrent_index :table_name, :column_name end end ``` +Note that it is not necessary to check if the index exists prior to +removing it. + ## Adding indexes If you need to add a unique index please keep in mind there is the possibility |
