internal/store/migrations/0025_ci_secrets_cron.up.sql

4e7f0573d0c35b2ec41de44f17f8fe45d3cd2408
gitbay/internal/store/migrations/0025_ci_secrets_cron.up.sql history · blame · raw

17 lines · 677 bytes

 1-- CI secrets: per-repo values injected into build environments. Stored
 2-- like mirror tokens — server-side, set over stdin, never echoed back.
 3CREATE TABLE build_secrets (
 4    repo_id INTEGER NOT NULL REFERENCES repos(id) ON DELETE CASCADE,
 5    name    TEXT NOT NULL,
 6    value   TEXT NOT NULL,
 7    PRIMARY KEY (repo_id, name)
 8);
 9-- Scheduled builds: jobs with a cron expression, synced from .gitbay/ci.yml
10-- on push and fired by the daemon's scheduler.
11CREATE TABLE build_schedules (
12    repo_id  INTEGER NOT NULL REFERENCES repos(id) ON DELETE CASCADE,
13    job      TEXT NOT NULL,
14    cron     TEXT NOT NULL,
15    next_run TEXT NOT NULL,
16    PRIMARY KEY (repo_id, job)
17);