summaryrefslogtreecommitdiff
path: root/doc/development/migration_style_guide.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/development/migration_style_guide.md')
-rw-r--r--doc/development/migration_style_guide.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md
index 8cdfbd558ca..e1205346585 100644
--- a/doc/development/migration_style_guide.md
+++ b/doc/development/migration_style_guide.md
@@ -516,12 +516,14 @@ class MyMigration < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
+ INDEX_NAME = 'index_name'
+
def up
- add_concurrent_index :table, :column
+ add_concurrent_index :table, :column, name: INDEX_NAME
end
def down
- remove_concurrent_index :table, :column, name: index_name
+ remove_concurrent_index :table, :column, name: INDEX_NAME
end
end
```