CREATE TABLE IF NOT EXISTS repo_release (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    repo UUID NOT NULL REFERENCES repo(id),
    tag_name TEXT NOT NULL,
    target_commit_sha TEXT NOT NULL,
    name TEXT NOT NULL,
    body TEXT,
    draft BOOLEAN NOT NULL DEFAULT FALSE,
    prerelease BOOLEAN NOT NULL DEFAULT FALSE,
    author UUID NOT NULL,
    published_at TIMESTAMPTZ,
    created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
    updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
