From aff9cad1d32eaf534fdd2a53d5cf3616404ff75a Mon Sep 17 00:00:00 2001 From: hellekin Date: Tue, 6 Oct 2020 00:21:40 +0200 Subject: Ensure only one Agent exists for a given group --- db/migrate/20201005154908_create_agents.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'db') diff --git a/db/migrate/20201005154908_create_agents.rb b/db/migrate/20201005154908_create_agents.rb index 32792ee..cc5a00f 100644 --- a/db/migrate/20201005154908_create_agents.rb +++ b/db/migrate/20201005154908_create_agents.rb @@ -6,6 +6,7 @@ class CreateAgents < ActiveRecord::Migration[6.0] t.timestamps end + add_index :agents, [:name], unique: true add_index :agents, [:uuid], unique: true end end -- cgit v1.2.3