diff options
Diffstat (limited to 'migrations/auth/20221219_02_buSEU-create-oauth2-tokens-table.py')
-rw-r--r-- | migrations/auth/20221219_02_buSEU-create-oauth2-tokens-table.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/migrations/auth/20221219_02_buSEU-create-oauth2-tokens-table.py b/migrations/auth/20221219_02_buSEU-create-oauth2-tokens-table.py index 81ca7df..778282b 100644 --- a/migrations/auth/20221219_02_buSEU-create-oauth2-tokens-table.py +++ b/migrations/auth/20221219_02_buSEU-create-oauth2-tokens-table.py @@ -21,8 +21,10 @@ steps = [ expires_in INTEGER NOT NULL, user_id TEXT NOT NULL, PRIMARY KEY(token_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 oauth2_tokens") |