initTestDBNoMigration initializes a test database with schema.sql but removes migration version data so tests can control the migration state themselves.
(t *testing.T)
| 38 | // initTestDBNoMigration initializes a test database with schema.sql but removes |
| 39 | // migration version data so tests can control the migration state themselves. |
| 40 | func initTestDBNoMigration(t *testing.T) *database.DB { |
| 41 | db := database.InitTestMemoryDBRaw(t, "") |
| 42 | // Remove migration versions from schema.sql so tests can set their own |
| 43 | database.MustExec(t, "clearing schema versions", db, "DELETE FROM system WHERE key IN (?, ?)", consts.SystemSchema, consts.SystemRemoteSchema) |
| 44 | return db |
| 45 | } |
| 46 | |
| 47 | func TestExecute_bump_schema(t *testing.T) { |
| 48 | testCases := []struct { |
no test coverage detected