aboutsummaryrefslogtreecommitdiff
path: root/migrations/auth/20221110_01_WtZ1I-create-resources-table.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-03-18 09:14:43 +0300
committerFrederick Muriuki Muriithi2023-03-18 09:15:15 +0300
commit30900b963c043939caa4492aca6d130843e048d0 (patch)
treec20dd229151d3db6202fcee754524b64a7fb1700 /migrations/auth/20221110_01_WtZ1I-create-resources-table.py
parenta1a376db4848a3ccd74c9c384efacea4579ce165 (diff)
downloadgenenetwork3-30900b963c043939caa4492aca6d130843e048d0.tar.gz
auth: resources: Disallow duplicate resource names.
Diffstat (limited to 'migrations/auth/20221110_01_WtZ1I-create-resources-table.py')
-rw-r--r--migrations/auth/20221110_01_WtZ1I-create-resources-table.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/migrations/auth/20221110_01_WtZ1I-create-resources-table.py b/migrations/auth/20221110_01_WtZ1I-create-resources-table.py
index 0b769b8..abc8895 100644
--- a/migrations/auth/20221110_01_WtZ1I-create-resources-table.py
+++ b/migrations/auth/20221110_01_WtZ1I-create-resources-table.py
@@ -12,7 +12,7 @@ steps = [
CREATE TABLE IF NOT EXISTS resources(
group_id TEXT NOT NULL,
resource_id TEXT NOT NULL,
- resource_name TEXT NOT NULL,
+ resource_name TEXT NOT NULL UNIQUE,
resource_category_id TEXT NOT NULL,
PRIMARY KEY(group_id, resource_id),
FOREIGN KEY(group_id) REFERENCES groups(group_id)