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

Method TestMigrateVersionInt

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

Source from the content-addressed store, hash-verified

180}
181
182func (s *SqliteMigrateSuite) TestMigrateVersionInt(c *C) {
183 migrations := &FileMigrationSource{
184 Dir: "test-migrations",
185 }
186
187 // Executes migration with target version 1
188 n, err := ExecVersion(s.Db, "sqlite3", migrations, Up, 1)
189 c.Assert(err, IsNil)
190 c.Assert(n, Equals, 1)
191
192 id, err := s.DbMap.SelectInt("SELECT COUNT(*) FROM people")
193 c.Assert(err, IsNil)
194 c.Assert(id, Equals, int64(0))
195}
196
197func (s *SqliteMigrateSuite) TestMigrateVersionInt2(c *C) {
198 migrations := &FileMigrationSource{

Callers

nothing calls this directly

Calls 1

ExecVersionFunction · 0.85

Tested by

no test coverage detected