MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / gateMigrationSQL

Function gateMigrationSQL

internal/store/commitment_gates_migration_test.go:18–29  ·  view source on GitHub ↗
(t *testing.T, pg bool)

Source from the content-addressed store, hash-verified

16const gatePGMigration = "136_schedule_gates_item.sql"
17
18func gateMigrationSQL(t *testing.T, pg bool) string {
19 t.Helper()
20 fs, path := migrationsFS, "migrations/"+gateMigration
21 if pg {
22 fs, path = pgMigrationsFS, "pgmigrations/"+gatePGMigration
23 }
24 b, err := fs.ReadFile(path)
25 if err != nil {
26 t.Fatal(err)
27 }
28 return string(b)
29}
30
31// oldGateTable is the table as migration 172 and Postgres 134 made it.
32const oldGateTable = `CREATE TABLE schedule_gates (

Callers 2

TestGateMigrationSQLiteFunction · 0.85

Calls 2

HelperMethod · 0.80
FatalMethod · 0.80

Tested by

no test coverage detected