refactor: consolidate applyMigrations into single exported function
All checks were successful
check / check (push) Successful in 1m8s
All checks were successful
check / check (push) Successful in 1m8s
Remove the unexported applyMigrations() and the runMigrations() method. ApplyMigrations() is now the single implementation, accepting context and an optional logger. connect() calls it directly. All callers updated to pass context.Background() and nil logger.
This commit is contained in:
@@ -82,7 +82,7 @@ func setupTestDB(t *testing.T) *sql.DB {
|
||||
t.Fatalf("failed to open test db: %v", err)
|
||||
}
|
||||
|
||||
if err := database.ApplyMigrations(db); err != nil {
|
||||
if err := database.ApplyMigrations(context.Background(), db, nil); err != nil {
|
||||
t.Fatalf("failed to apply migrations: %v", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user