[Fix] User deletion & migration
This commit is contained in:
parent
c447e6e863
commit
19d97e4555
14 changed files with 456 additions and 148 deletions
11
migrations/005_nullable_user_iota.sql
Normal file
11
migrations/005_nullable_user_iota.sql
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
ALTER TABLE users
|
||||
DROP FOREIGN KEY fk_users_iota;
|
||||
|
||||
ALTER TABLE users
|
||||
MODIFY iota_id BIGINT NULL;
|
||||
|
||||
ALTER TABLE users
|
||||
ADD CONSTRAINT fk_users_iota
|
||||
FOREIGN KEY (iota_id)
|
||||
REFERENCES iotas (id)
|
||||
ON DELETE SET NULL;
|
||||
Loading…
Reference in a new issue