From f140b95ee7104ec8e07c3908c4d645782c7cbce1 Mon Sep 17 00:00:00 2001 From: Ryan Rathsam Date: Fri, 13 Dec 2019 12:37:35 -0500 Subject: [PATCH] Adding unique index to user_acls - A user should only ever have one instance of an acl, this index enforces that at the table level. --- configuration/etl/etl_tables.d/acls/user_acls.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configuration/etl/etl_tables.d/acls/user_acls.json b/configuration/etl/etl_tables.d/acls/user_acls.json index c55498bfa9..bdd23c2899 100644 --- a/configuration/etl/etl_tables.d/acls/user_acls.json +++ b/configuration/etl/etl_tables.d/acls/user_acls.json @@ -41,6 +41,15 @@ "columns": [ "acl_id" ] + }, + { + "name": "idx_user_id_acl_id", + "columns": [ + "user_id", + "acl_id" + ], + "type": "BTREE", + "is_unique": true } ], "foreign_key_constraints": [