Phase 13, part 4: proving a team's domain

Before Supermarket crawls a team's website, reads its Search Console data
or publishes to it, the team proves the domain is theirs: a DNS TXT
record, a file on the site, or owning its Search Console property. One
team holds a domain at a time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 12:21:42 -07:00
co-authored by Claude Opus 5.5
parent d5fb1898e8
commit 47cc8b2b10
11 changed files with 444 additions and 8 deletions
+11
View File
@@ -271,6 +271,17 @@ CREATE TABLE teams (
delete_at TEXT NOT NULL DEFAULT '' -- deleting: when its data goes for good
);
ALTER TABLE sessions ADD COLUMN team_id INTEGER NOT NULL DEFAULT 1;
`,
},
// 41
{
Note: "proving a team's domain is theirs (multi-tenant edition)",
Platform: true,
SQLite: `
ALTER TABLE teams ADD COLUMN verify_token TEXT NOT NULL DEFAULT ''; -- what the TXT record or the file must hold
ALTER TABLE teams ADD COLUMN verified_at TEXT NOT NULL DEFAULT ''; -- '' until proved
ALTER TABLE teams ADD COLUMN verified_by TEXT NOT NULL DEFAULT ''; -- dns, file or search-console
CREATE UNIQUE INDEX teams_proved_domain ON teams(domain) WHERE verified_at <> '';
`,
},
}