diff options
Diffstat (limited to 'migrations/auth/20221219_03_PcTrb-create-authorisation-code-table.py')
-rw-r--r-- | migrations/auth/20221219_03_PcTrb-create-authorisation-code-table.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/migrations/auth/20221219_03_PcTrb-create-authorisation-code-table.py b/migrations/auth/20221219_03_PcTrb-create-authorisation-code-table.py index 495916f..1683f87 100644 --- a/migrations/auth/20221219_03_PcTrb-create-authorisation-code-table.py +++ b/migrations/auth/20221219_03_PcTrb-create-authorisation-code-table.py @@ -21,8 +21,10 @@ steps = [ code_challenge_method TEXT, user_id TEXT NOT NULL, PRIMARY KEY (code_id), - FOREIGN KEY (client_id) REFERENCES oauth2_clients(client_id), + FOREIGN KEY (client_id) REFERENCES oauth2_clients(client_id) + ON UPDATE CASCADE ON DELETE RESTRICT, FOREIGN KEY (user_id) REFERENCES users(user_id) + ON UPDATE CASCADE ON DELETE RESTRICT ) WITHOUT ROWID """, "DROP TABLE IF EXISTS authorisation_code") |