diff options
author | Frederick Muriuki Muriithi | 2023-03-18 09:14:43 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-03-18 09:15:15 +0300 |
commit | 30900b963c043939caa4492aca6d130843e048d0 (patch) | |
tree | c20dd229151d3db6202fcee754524b64a7fb1700 /migrations/auth/20221110_01_WtZ1I-create-resources-table.py | |
parent | a1a376db4848a3ccd74c9c384efacea4579ce165 (diff) | |
download | genenetwork3-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.py | 2 |
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) |