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

Method TestMigrateMultiple

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

Source from the content-addressed store, hash-verified

77}
78
79func (s *SqliteMigrateSuite) TestMigrateMultiple(c *C) {
80 migrations := &MemoryMigrationSource{
81 Migrations: sqliteMigrations[:2],
82 }
83
84 // Executes two migrations
85 n, err := Exec(s.Db, "sqlite3", migrations, Up)
86 c.Assert(err, IsNil)
87 c.Assert(n, Equals, 2)
88
89 // Can use column now
90 _, err = s.DbMap.Exec("SELECT first_name FROM people")
91 c.Assert(err, IsNil)
92}
93
94func (s *SqliteMigrateSuite) TestMigrateIncremental(c *C) {
95 migrations := &MemoryMigrationSource{

Callers

nothing calls this directly

Calls 2

ExecFunction · 0.85
ExecMethod · 0.65

Tested by

no test coverage detected