MCPcopy
hub / github.com/rubenv/sql-migrate / TestMigrateMax

Method TestMigrateMax

migrate_test.go:167–180  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

165}
166
167func (s *SqliteMigrateSuite) TestMigrateMax(c *C) {
168 migrations := &FileMigrationSource{
169 Dir: "test-migrations",
170 }
171
172 // Executes one migration
173 n, err := ExecMax(s.Db, "sqlite3", migrations, Up, 1)
174 c.Assert(err, IsNil)
175 c.Assert(n, Equals, 1)
176
177 id, err := s.DbMap.SelectInt("SELECT COUNT(*) FROM people")
178 c.Assert(err, IsNil)
179 c.Assert(id, Equals, int64(0))
180}
181
182func (s *SqliteMigrateSuite) TestMigrateVersionInt(c *C) {
183 migrations := &FileMigrationSource{

Callers

nothing calls this directly

Calls 1

ExecMaxFunction · 0.85

Tested by

no test coverage detected