refactor(sitesvc): rename Org to Instance, refuse an unmigrated database

The signup form's JSON field becomes instance_name, and the pending-signup
document field with it. That collection is sitesvc-private and expires after
24 hours, so no migration is needed, but in-flight signups written before the
deploy will fail verification.
This commit is contained in:
2026-07-24 14:00:11 +01:00
parent 3891a2c239
commit 3f0f12b111
7 changed files with 70 additions and 63 deletions
+7
View File
@@ -28,6 +28,13 @@ func main() {
}
log.Printf("connected to MongoDB (database %q)", store.DatabaseName())
guardCtx, guardCancel := context.WithTimeout(context.Background(), 10*time.Second)
guardErr := store.RequireMigratedDatabase(guardCtx)
guardCancel()
if guardErr != nil {
log.Fatalf("database check failed: %v", guardErr)
}
if err := store.EnsureIndexes(); err != nil {
log.Fatalf("failed to ensure indexes: %v", err)
}