internal/store/migrations/0017_mirrors.up.sql

08a24a6e68d86f3dfd13c88a8125b580b1dc614b
gitbay/internal/store/migrations/0017_mirrors.up.sql

13 lines · 552 bytes

 1CREATE TABLE mirrors (
 2    id         INTEGER PRIMARY KEY,
 3    repo_id    INTEGER NOT NULL REFERENCES repos(id) ON DELETE CASCADE,
 4    direction  TEXT NOT NULL CHECK (direction IN ('push','pull')),
 5    url        TEXT NOT NULL,
 6    username   TEXT NOT NULL DEFAULT '',
 7    token      TEXT NOT NULL DEFAULT '',
 8    dirty      INTEGER NOT NULL DEFAULT 1,
 9    last_sync  TEXT NOT NULL DEFAULT '',
10    last_error TEXT NOT NULL DEFAULT '',
11    created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')),
12    UNIQUE (repo_id, direction, url)
13);
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form