internal/store/migrations/0023_page_domains.up.sql

v1.25.0
gitbay/internal/store/migrations/0023_page_domains.up.sql history · blame · raw

7 lines · 341 bytes

1-- Custom domains for pages: one domain serves one repo's pages branch.
2CREATE TABLE page_domains (
3    domain     TEXT PRIMARY KEY,
4    repo_id    INTEGER NOT NULL REFERENCES repos(id) ON DELETE CASCADE,
5    created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ','now'))
6);
7CREATE INDEX page_domains_repo ON page_domains(repo_id);