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

9d8fd17820457f0c60320c9f4a8b0da1db45a6b0
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);