| 65 | } |
| 66 | |
| 67 | func (*ToApplyMigrateSuite) TestDownAll(c *C) { |
| 68 | toApply := ToApply(toapplyMigrations, "efg", Down) |
| 69 | c.Assert(toApply, HasLen, 3) |
| 70 | c.Assert(toApply[0], Equals, toapplyMigrations[2]) |
| 71 | c.Assert(toApply[1], Equals, toapplyMigrations[1]) |
| 72 | c.Assert(toApply[2], Equals, toapplyMigrations[0]) |
| 73 | |
| 74 | toApply = ToApply(toapplyMigrations, "zzz", Down) |
| 75 | c.Assert(toApply, HasLen, 3) |
| 76 | c.Assert(toApply[0], Equals, toapplyMigrations[2]) |
| 77 | c.Assert(toApply[1], Equals, toapplyMigrations[1]) |
| 78 | c.Assert(toApply[2], Equals, toapplyMigrations[0]) |
| 79 | } |
| 80 | |
| 81 | func (*ToApplyMigrateSuite) TestAlphaNumericMigrations(c *C) { |
| 82 | migrations := byId([]*Migration{ |