START TRANSACTION;

ALTER TABLE request_goal
    ADD COLUMN version BIGINT NOT NULL DEFAULT 0;

CREATE INDEX IF NOT EXISTS quota_request_goal_id ON quota_request (goal_id);
CREATE INDEX IF NOT EXISTS quota_request_resource_preorder_reason_type ON quota_request (resource_preorder_reason_type);

COMMIT;
