CREATE TABLE eye.object_missing_on_frame (
    id bigserial PRIMARY KEY,
    txn_id bigint NOT NULL,
    object_id bigint NOT NULL REFERENCES eye.object (object_id) ON DELETE CASCADE,
    frame_id bigint NOT NULL REFERENCES eye.frame (frame_id) ON DELETE CASCADE,
    deleted boolean,

    UNIQUE(object_id, frame_id)
);

ALTER TABLE eye.object
    ADD COLUMN disappeared_at timestamp with time zone;

ALTER TABLE eye.object DROP COLUMN exists;
