-- Add auto_merge_local column to contracts table
-- When enabled alongside local_only, completed task changes will be automatically
-- merged to the master/main branch locally (without pushing or creating PRs).

ALTER TABLE contracts
ADD COLUMN IF NOT EXISTS auto_merge_local BOOLEAN NOT NULL DEFAULT FALSE;

COMMENT ON COLUMN contracts.auto_merge_local IS 'Whether to auto-merge to target branch locally when local_only mode is enabled';
