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

7 lines
210 B
MySQL
Raw Normal View History

2024-12-12 07:23:46 +00:00
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;