internal/store/migrations/0024_domain_verify.up.sql

4d2790c4197f943ef7906c32af388d6b501b93f8
gitbay/internal/store/migrations/0024_domain_verify.up.sql

6 lines · 434 bytes

1-- DNS-challenge verification for custom pages domains. Existing claims
2-- predate verification and stay serving: they are grandfathered verified.
3ALTER TABLE page_domains ADD COLUMN token TEXT NOT NULL DEFAULT '';
4ALTER TABLE page_domains ADD COLUMN user_id INTEGER NOT NULL DEFAULT 0;
5ALTER TABLE page_domains ADD COLUMN verified_at TEXT NOT NULL DEFAULT '';
6UPDATE page_domains SET verified_at = created_at WHERE verified_at = '';