mirror of
https://github.com/openziti/zrok.git
synced 2025-06-26 20:52:33 +02:00
remove cascading deletes
This commit is contained in:
parent
f77404b4db
commit
8d51fce2b8
@ -4,4 +4,4 @@
|
|||||||
ALTER TABLE password_reset_requests DROP CONSTRAINT password_reset_requests_account_id_key;
|
ALTER TABLE password_reset_requests DROP CONSTRAINT password_reset_requests_account_id_key;
|
||||||
|
|
||||||
-- add new constraint which doesnt mind having multiple resets for account ids
|
-- add new constraint which doesnt mind having multiple resets for account ids
|
||||||
ALTER TABLE password_reset_requests ADD CONSTRAINT password_reset_requests_account_id_key FOREIGN KEY (account_id) REFERENCES accounts (id) ON DELETE CASCADE;
|
ALTER TABLE password_reset_requests ADD CONSTRAINT password_reset_requests_account_id_key FOREIGN KEY (account_id) REFERENCES accounts (id);
|
||||||
|
@ -7,7 +7,7 @@ CREATE TABLE password_reset_requests (
|
|||||||
token string not null unique,
|
token string not null unique,
|
||||||
created_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')),
|
created_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')),
|
||||||
updated_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')),
|
updated_at datetime not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')),
|
||||||
account_id integer not null constraint fk_accounts_password_reset_requests references accounts on delete cascade,
|
account_id integer not null constraint fk_accounts_password_reset_requests references accounts,
|
||||||
deleted boolean not null default(false),
|
deleted boolean not null default(false),
|
||||||
|
|
||||||
constraint chk_token check(token <> '')
|
constraint chk_token check(token <> '')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user