CREATE TABLE service.cleanspecial_task (
    id bigint PRIMARY KEY REFERENCES service.task (id),
    branch_id bigint NOT NULL,
    commit_id bigint NOT NULL,

    aoi_id bigint,
    lock_ids bigint[] NOT NULL
);

CREATE TABLE service.cleanspecial_commit (
    task_id bigint NOT NULL REFERENCES service.cleanspecial_task(id),
    commit_id bigint NOT NULL,
    synchronized boolean NOT NULL DEFAULT FALSE,

    PRIMARY KEY (task_id, commit_id)
);
