[Fix] User deletion & migration
This commit is contained in:
parent
b65b22dfbc
commit
d3bcf56b59
14 changed files with 456 additions and 148 deletions
8
migrations/006_pending_iota_user_erasure.sql
Normal file
8
migrations/006_pending_iota_user_erasure.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
CREATE TABLE pending_iota_user_erasure (
|
||||
user_id BIGINT NOT NULL,
|
||||
iota_id BIGINT NOT NULL,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (user_id, iota_id),
|
||||
CONSTRAINT fk_pending_iota_user_erasure_iota
|
||||
FOREIGN KEY (iota_id) REFERENCES iotas(id) ON DELETE CASCADE
|
||||
);
|
||||
Loading…
Reference in a new issue