Fix upgrade test bool literal for Postgres
All checks were successful
CI/CD / detect-changes (pull_request) Successful in 4s
CI/CD / test-frontend (pull_request) Successful in 5s
CI/CD / test-go-pg (pull_request) Successful in 2m35s
CI/CD / test-sqlite (pull_request) Successful in 2m51s
CI/CD / build-and-deploy (pull_request) Successful in 1m4s
All checks were successful
CI/CD / detect-changes (pull_request) Successful in 4s
CI/CD / test-frontend (pull_request) Successful in 5s
CI/CD / test-go-pg (pull_request) Successful in 2m35s
CI/CD / test-sqlite (pull_request) Successful in 2m51s
CI/CD / build-and-deploy (pull_request) Successful in 1m4s
Use `true` instead of `1` for BOOLEAN column insert in TestUpgrade_SchemaMultiColumnAdd. Postgres BOOLEAN rejects integer literals; `true` works on both PG and SQLite. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -236,8 +236,9 @@ func TestUpgrade_SchemaMultiColumnAdd(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Verify new row can use all columns
|
// Verify new row can use all columns
|
||||||
|
// Use 'true' for bool — works on both Postgres (BOOLEAN) and SQLite (INTEGER, coerced to 1)
|
||||||
_, err = database.TestDB.ExecContext(ctx,
|
_, err = database.TestDB.ExecContext(ctx,
|
||||||
fmt.Sprintf("INSERT INTO %s (id, name, priority, score, active) VALUES ('r2', 'new', 3, 4.5, 1)", physical))
|
fmt.Sprintf("INSERT INTO %s (id, name, priority, score, active) VALUES ('r2', 'new', 3, 4.5, true)", physical))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal("insert with new columns failed:", err)
|
t.Fatal("insert with new columns failed:", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user