fp/services/migrations-schema/migrations/00132_rename-vtuber_num-to-...

7 lines
210 B
SQL

ALTER TABLE IF EXISTS api.streams
ADD COLUMN IF NOT EXISTS vtuber_id INT;
ALTER TABLE api.streams
ADD CONSTRAINT streams_vtuber_fk FOREIGN KEY (vtuber_id)
REFERENCES api.vtubers (id)
ON DELETE CASCADE;