backend: add unique index on connections.name&path

This commit is contained in:
0x1eef 2023-12-20 16:36:21 -03:00
parent ae4e61abbf
commit bbdc8ff395

View file

@ -0,0 +1,9 @@
class AddUniqueIndexToConnections < ActiveRecord::Migration[7.1]
def up
add_index :connections, [:name, :path], unique: true
end
def down
remove_index :connections, [:name, :path], unique: true
end
end