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

       aoi geometry NOT NULL,
       lock_id bigint NOT NULL,
       filter_expression_id bigint,
       params json NOT NULL
);

CREATE TABLE service.groupedit_commit(
       task_id bigint NOT NULL REFERENCES service.groupedit_task(id),
       commit_id bigint NOT NULL,
       synchronized boolean NOT NULL DEFAULT false,

       PRIMARY KEY (task_id, commit_id)
);
