omega/migrations/005_nullable_user_iota.sql

11 lines
245 B
SQL

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;