fp/services/migrations-schema/migrations/00134_add-thumbnail-fk-to-v...

7 lines
190 B
SQL

ALTER TABLE api.vods ADD COLUMN thumbnail_id INTEGER;
ALTER TABLE api.vods
ADD CONSTRAINT vods_thumbnail_fk FOREIGN KEY (thumbnail_id)
REFERENCES api.b2_files (id)
ON DELETE CASCADE;