示例#1
0
        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));
        }
示例#2
0
        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));
        }
示例#3
0
 public void BeforeEach()
 {
     EasyMig.ClearMigrations();
     EasyMig.ClearSeeders();
 }
示例#4
0
 public void Clear()
 {
     EasyMig.ClearMigrations();
     EasyMig.ClearSeeders();
 }