Commit 362a96b2 authored by Marcel Amirault's avatar Marcel Amirault

Merge branch 'harrisonbrock-master-patch-90829' into 'master'

Adding variable INDEX_NAME to keep all code examples the same in the docs.

See merge request gitlab-org/gitlab!50610
parents 17fe597a 408326e0
...@@ -516,12 +516,14 @@ class MyMigration < ActiveRecord::Migration[6.0] ...@@ -516,12 +516,14 @@ class MyMigration < ActiveRecord::Migration[6.0]
disable_ddl_transaction! disable_ddl_transaction!
INDEX_NAME = 'index_name'
def up def up
add_concurrent_index :table, :column add_concurrent_index :table, :column, name: INDEX_NAME
end end
def down def down
remove_concurrent_index :table, :column, name: index_name remove_concurrent_index :table, :column, name: INDEX_NAME
end end
end end
``` ```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment