fp/services/migrations-schema/migrations/00021_add-foreign-key-to-se...

10 lines
304 B
MySQL
Raw Normal View History

2024-08-17 02:42:44 +00:00
DROP TABLE api.segments_stream_links;
CREATE TABLE api.segments_stream_links (
id int GENERATED ALWAYS AS IDENTITY,
stream_id UUID NOT NULL REFERENCES api.streams(id),
segment_id INT NOT NULL REFERENCES api.segments(id),
capture_job_id text NOT NULL,
PRIMARY KEY(id, stream_id, segment_id)
);