提交 11f38dd1 编写于 作者: D Dylan Griffith

Make add_index_to_namespaces_runners_token migration reversible

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册