diff options
Diffstat (limited to 'migrations/auth/20221114_02_DKKjn-drop-generic-role-tables.py')
-rw-r--r-- | migrations/auth/20221114_02_DKKjn-drop-generic-role-tables.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/migrations/auth/20221114_02_DKKjn-drop-generic-role-tables.py b/migrations/auth/20221114_02_DKKjn-drop-generic-role-tables.py index e767aeb..6bd101b 100644 --- a/migrations/auth/20221114_02_DKKjn-drop-generic-role-tables.py +++ b/migrations/auth/20221114_02_DKKjn-drop-generic-role-tables.py @@ -24,8 +24,10 @@ steps = [ generic_role_id TEXT NOT NULL, privilege_id TEXT NOT NULL, PRIMARY KEY(generic_role_id, privilege_id), - FOREIGN KEY(generic_role_id) REFERENCES generic_roles(role_id), + FOREIGN KEY(generic_role_id) REFERENCES generic_roles(role_id) + ON UPDATE CASCADE ON DELETE RESTRICT, FOREIGN KEY(privilege_id) REFERENCES privileges(privilege_id) + ON UPDATE CASCADE ON DELETE RESTRICT ) WITHOUT ROWID """), step( |