public void TestDropStoredProcedure() { this.BeforeEach(); var dbName = "db1"; var tableName = "users"; EasyMig.ClearMigrations(); EasyMig.DropStoredProcedure("p1_test"); EasyMig.ToMySql.DoMigrationsFromMemory(completeConnectionString); Assert.IsFalse(EasyMig.Information.MySql.ProcedureExists(dbName, "p1_test", completeConnectionString)); }
public void TestCreateStoredProcedure() { this.BeforeEach(); var dbName = "db1"; var tableName = "users"; EasyMig.ClearMigrations(); EasyMig.CreateStoredProcedure("p1_test") .AddInParameter("p_id", ColumnType.Int()) .AddOutParameter("p_age", ColumnType.Int()) .SetBody("select age into p_age from users where id=p_id;"); EasyMig.ToMySql.DoMigrationsFromMemory(completeConnectionString); Assert.IsTrue(EasyMig.Information.MySql.ProcedureExists(dbName, "p1_test", completeConnectionString)); }
public void BeforeEach() { EasyMig.ClearMigrations(); EasyMig.ClearSeeders(); }
public void Clear() { EasyMig.ClearMigrations(); EasyMig.ClearSeeders(); }