| 165 | } |
| 166 | |
| 167 | func (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 | |
| 182 | func (s *SqliteMigrateSuite) TestMigrateVersionInt(c *C) { |
| 183 | migrations := &FileMigrationSource{ |