style: gofmt -w
ci / shared (pull_request) Failing after 2s
ci / test (pull_request) Failing after 16s
ci / image (pull_request) Has been skipped

This commit is contained in:
2026-05-19 12:03:10 +02:00
parent c92fbad94b
commit 96aeb51779
2 changed files with 11 additions and 10 deletions
+6 -5
View File
@@ -1,11 +1,12 @@
// migrate — standalone CLI that applies tenant-registry's SQL migrations.
//
// Usage:
// migrate up apply all pending migrations
// migrate down roll back the most recent migration
// migrate down --all roll back every migration (DESTRUCTIVE)
// migrate version print the current schema version
// migrate force <version> mark a specific version applied (recovery)
//
// migrate up apply all pending migrations
// migrate down roll back the most recent migration
// migrate down --all roll back every migration (DESTRUCTIVE)
// migrate version print the current schema version
// migrate force <version> mark a specific version applied (recovery)
//
// Reads DATABASE_URL from the environment. Migrations are embedded so this
// binary is self-contained — ship it as an Orca init container in prod.
+5 -5
View File
@@ -275,11 +275,11 @@ func TestSlugConstraint(t *testing.T) {
{"acme", false},
{"a-c-m-e", false},
{"a1b2c3", false},
{"a", true}, // too short
{"-acme", true}, // leading dash
{"acme-", true}, // trailing dash
{"AcMe", true}, // uppercase
{"a_b", true}, // underscore
{"a", true}, // too short
{"-acme", true}, // leading dash
{"acme-", true}, // trailing dash
{"AcMe", true}, // uppercase
{"a_b", true}, // underscore
}
for _, c := range cases {
_, err := db.Exec(`INSERT INTO tenants (slug, name) VALUES ($1, 'X')`, c.slug)