diff options
author | Frederick Muriuki Muriithi | 2023-01-18 14:59:35 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-01-18 14:59:35 +0300 |
commit | 4cc328ef78c7b8108d7623fdd4fcae5294317f2e (patch) | |
tree | 5fff59d3a57bb6e0ec044373f205ed4503d8b47a /migrations/auth/20221117_01_RDlfx-modify-group-roles-add-group-role-id.py | |
parent | e97703817628e6b781c5b883ed3aa7fbf9967628 (diff) | |
download | genenetwork3-4cc328ef78c7b8108d7623fdd4fcae5294317f2e.tar.gz |
auth: Fix tests after enforcing FOREIGN KEY constraint
Fix a number of tests and fixtures that were not conforming to the FOREIGN KEY
constraints:
* Each test that creates a new "object" needs to clean up after itself
* Each fixture that sets up test data needs to clean up after itself
Diffstat (limited to 'migrations/auth/20221117_01_RDlfx-modify-group-roles-add-group-role-id.py')
-rw-r--r-- | migrations/auth/20221117_01_RDlfx-modify-group-roles-add-group-role-id.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/migrations/auth/20221117_01_RDlfx-modify-group-roles-add-group-role-id.py b/migrations/auth/20221117_01_RDlfx-modify-group-roles-add-group-role-id.py index 7115bc3..2deff10 100644 --- a/migrations/auth/20221117_01_RDlfx-modify-group-roles-add-group-role-id.py +++ b/migrations/auth/20221117_01_RDlfx-modify-group-roles-add-group-role-id.py @@ -33,6 +33,7 @@ steps = [ group_role_id TEXT PRIMARY KEY, group_id TEXT NOT NULL, role_id TEXT NOT NULL, + UNIQUE (group_id, role_id), FOREIGN KEY(group_id) REFERENCES groups(group_id), FOREIGN KEY(role_id) REFERENCES roles(role_id) ) WITHOUT ROWID |