MCPcopy Index your code
hub / github.com/rubenv/sql-migrate / TestMigrateVersionInt2

Method TestMigrateVersionInt2

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

Source from the content-addressed store, hash-verified

195}
196
197func (s *SqliteMigrateSuite) TestMigrateVersionInt2(c *C) {
198 migrations := &FileMigrationSource{
199 Dir: "test-migrations",
200 }
201
202 // Executes migration with target version 2
203 n, err := ExecVersion(s.Db, "sqlite3", migrations, Up, 2)
204 c.Assert(err, IsNil)
205 c.Assert(n, Equals, 2)
206
207 id, err := s.DbMap.SelectInt("SELECT COUNT(*) FROM people")
208 c.Assert(err, IsNil)
209 c.Assert(id, Equals, int64(1))
210}
211
212func (s *SqliteMigrateSuite) TestMigrateVersionIntFailedWithNotExistingVerion(c *C) {
213 migrations := &FileMigrationSource{

Callers

nothing calls this directly

Calls 1

ExecVersionFunction · 0.85

Tested by

no test coverage detected