Commit 11f38dd1 authored by Dylan Griffith's avatar Dylan Griffith

Make add_index_to_namespaces_runners_token migration reversible

parent ed9b285b
......@@ -8,7 +8,13 @@ class AddIndexToNamespacesRunnersToken < ActiveRecord::Migration
disable_ddl_transaction!
def change
def up
add_concurrent_index :namespaces, :runners_token, unique: true
end
def down
if index_exists?(:namespaces, :runners_token, unique: true)
remove_index :namespaces, :runners_token
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