aboutsummaryrefslogtreecommitdiff
path: root/migrations/auth/20221114_03_PtWjc-create-group-roles-table.py
diff options
context:
space:
mode:
Diffstat (limited to 'migrations/auth/20221114_03_PtWjc-create-group-roles-table.py')
-rw-r--r--migrations/auth/20221114_03_PtWjc-create-group-roles-table.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/migrations/auth/20221114_03_PtWjc-create-group-roles-table.py b/migrations/auth/20221114_03_PtWjc-create-group-roles-table.py
index f314000..a7e7b45 100644
--- a/migrations/auth/20221114_03_PtWjc-create-group-roles-table.py
+++ b/migrations/auth/20221114_03_PtWjc-create-group-roles-table.py
@@ -13,8 +13,10 @@ steps = [
group_id TEXT NOT NULL,
role_id TEXT NOT NULL,
PRIMARY KEY(group_id, role_id),
- FOREIGN KEY(group_id) REFERENCES groups(group_id),
+ FOREIGN KEY(group_id) REFERENCES groups(group_id)
+ ON UPDATE CASCADE ON DELETE RESTRICT,
FOREIGN KEY(role_id) REFERENCES roles(role_id)
+ ON UPDATE CASCADE ON DELETE RESTRICT
) WITHOUT ROWID
""",
"DROP TABLE IF EXISTS group_roles"),