CREATE TABLE IF NOT EXISTS repo_watch (
    id BIGSERIAL PRIMARY KEY,
    user_uuid UUID NOT NULL,
    repo_uuid UUID NOT NULL,
    show_dashboard BOOLEAN NOT NULL DEFAULT false,
    notify_email BOOLEAN NOT NULL DEFAULT false,
    created_at TIMESTAMPTZ NOT NULL,
    updated_at TIMESTAMPTZ NOT NULL,
    UNIQUE (user_uuid, repo_uuid)
);

CREATE UNIQUE INDEX idx_repo_watch_user_repo ON repo_watch (user_uuid, repo_uuid);
