style: gofmt -w
This commit is contained in:
+6
-5
@@ -1,11 +1,12 @@
|
|||||||
// migrate — standalone CLI that applies tenant-registry's SQL migrations.
|
// migrate — standalone CLI that applies tenant-registry's SQL migrations.
|
||||||
//
|
//
|
||||||
// Usage:
|
// Usage:
|
||||||
// migrate up apply all pending migrations
|
//
|
||||||
// migrate down roll back the most recent migration
|
// migrate up apply all pending migrations
|
||||||
// migrate down --all roll back every migration (DESTRUCTIVE)
|
// migrate down roll back the most recent migration
|
||||||
// migrate version print the current schema version
|
// migrate down --all roll back every migration (DESTRUCTIVE)
|
||||||
// migrate force <version> mark a specific version applied (recovery)
|
// 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
|
// Reads DATABASE_URL from the environment. Migrations are embedded so this
|
||||||
// binary is self-contained — ship it as an Orca init container in prod.
|
// binary is self-contained — ship it as an Orca init container in prod.
|
||||||
|
|||||||
@@ -275,11 +275,11 @@ func TestSlugConstraint(t *testing.T) {
|
|||||||
{"acme", false},
|
{"acme", false},
|
||||||
{"a-c-m-e", false},
|
{"a-c-m-e", false},
|
||||||
{"a1b2c3", false},
|
{"a1b2c3", false},
|
||||||
{"a", true}, // too short
|
{"a", true}, // too short
|
||||||
{"-acme", true}, // leading dash
|
{"-acme", true}, // leading dash
|
||||||
{"acme-", true}, // trailing dash
|
{"acme-", true}, // trailing dash
|
||||||
{"AcMe", true}, // uppercase
|
{"AcMe", true}, // uppercase
|
||||||
{"a_b", true}, // underscore
|
{"a_b", true}, // underscore
|
||||||
}
|
}
|
||||||
for _, c := range cases {
|
for _, c := range cases {
|
||||||
_, err := db.Exec(`INSERT INTO tenants (slug, name) VALUES ($1, 'X')`, c.slug)
|
_, err := db.Exec(`INSERT INTO tenants (slug, name) VALUES ($1, 'X')`, c.slug)
|
||||||
|
|||||||
Reference in New Issue
Block a user