Feat v0.7.6 code hygiene (#60)
All checks were successful
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-runners (push) Has been skipped
CI/CD / test-frontend (push) Successful in 6s
CI/CD / test-go-pg (push) Successful in 2m48s
CI/CD / build-and-deploy (push) Successful in 25s
CI/CD / test-sqlite (push) Successful in 2m55s
All checks were successful
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-runners (push) Has been skipped
CI/CD / test-frontend (push) Successful in 6s
CI/CD / test-go-pg (push) Successful in 2m48s
CI/CD / build-and-deploy (push) Successful in 25s
CI/CD / test-sqlite (push) Successful in 2m55s
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #60.
This commit is contained in:
@@ -74,6 +74,12 @@ func Migrate() error {
|
||||
}
|
||||
}
|
||||
|
||||
// v0.7.6: SQLite 013_test_runner_type.sql was renumbered to 014 to
|
||||
// align with PG migration numbering. Mark as applied if the old name exists.
|
||||
if !IsPostgres() {
|
||||
DB.Exec("UPDATE schema_migrations SET version = '014_test_runner_type.sql' WHERE version = '013_test_runner_type.sql'")
|
||||
}
|
||||
|
||||
// Apply pending migrations.
|
||||
applied := 0
|
||||
for _, file := range files {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
-- ==========================================
|
||||
-- Armature — 009 Multi-Replica HA
|
||||
-- ==========================================
|
||||
-- Note: migration 008 was merged into 007 during pre-1.0 schema consolidation.
|
||||
|
||||
CREATE TABLE IF NOT EXISTS ws_tickets (
|
||||
id TEXT PRIMARY KEY,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
-- ==========================================
|
||||
-- Armature — 009 Multi-Replica HA (SQLite)
|
||||
-- ==========================================
|
||||
-- Note: migration 008 was merged into 007 during pre-1.0 schema consolidation.
|
||||
|
||||
CREATE TABLE IF NOT EXISTS ws_tickets (
|
||||
id TEXT PRIMARY KEY,
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
-- 013_cluster_registry.sql — placeholder
|
||||
-- Postgres-only migration: creates UNLOGGED node_registry table for
|
||||
-- cluster self-assembly (v0.6.0). SQLite deployments are single-node
|
||||
-- and do not use the cluster registry. This placeholder aligns the
|
||||
-- migration numbering between dialects.
|
||||
--
|
||||
-- See postgres/013_cluster_registry.sql for the actual schema.
|
||||
@@ -1,4 +1,4 @@
|
||||
-- 013_test_runner_type.sql — v0.7.1
|
||||
-- 014_test_runner_type.sql — v0.7.1
|
||||
-- Adds 'test-runner' to the packages.type CHECK constraint.
|
||||
-- SQLite doesn't support ALTER CHECK — must recreate the table.
|
||||
|
||||
@@ -427,25 +427,6 @@ func SeedAdminsGroupMember(t *testing.T, userID string) {
|
||||
}
|
||||
}
|
||||
|
||||
// SeedTestChannel creates a test channel owned by userID and returns the channel ID.
|
||||
func SeedTestChannel(t *testing.T, userID, title string) string {
|
||||
t.Helper()
|
||||
if IsSQLite() {
|
||||
id := uuid.New().String()
|
||||
_, err := DB.Exec(`INSERT INTO channels (id, user_id, title) VALUES (?, ?, ?)`, id, userID, title)
|
||||
if err != nil {
|
||||
t.Fatalf("SeedTestChannel: %v", err)
|
||||
}
|
||||
return id
|
||||
}
|
||||
var id string
|
||||
err := DB.QueryRow(`INSERT INTO channels (user_id, title) VALUES ($1, $2) RETURNING id`, userID, title).Scan(&id)
|
||||
if err != nil {
|
||||
t.Fatalf("SeedTestChannel: %v", err)
|
||||
}
|
||||
return id
|
||||
}
|
||||
|
||||
// SeedTestTeam creates a test team and returns the team ID.
|
||||
func SeedTestTeam(t *testing.T, name, createdBy string) string {
|
||||
t.Helper()
|
||||
|
||||
Reference in New Issue
Block a user