internal/store/migrations/0030_runner_seen.up.sql

3797906826d106b7e052e9d1a95958af851ec052
gitbay/internal/store/migrations/0030_runner_seen.up.sql history · blame · raw

8 lines · 369 bytes

1-- One row per runner account: when it last polled, the repositories it
2-- asked to be limited to, and the build it currently holds.
3CREATE TABLE runner_seen (
4    user_id   INTEGER PRIMARY KEY REFERENCES users(id) ON DELETE CASCADE,
5    last_seen TEXT NOT NULL,
6    scope     TEXT NOT NULL DEFAULT '',
7    build_id  INTEGER REFERENCES builds(id) ON DELETE SET NULL
8);