Exemple #1
0
 protected void Procedure(MigrationActionType action, string procedureName, string bodySql, Action <string, string> createAction)
 {
     if (action == MigrationActionType.Up)
     {
         createAction(procedureName, bodySql);
     }
     else
     {
         DropProcedure(procedureName);
     }
 }
Exemple #2
0
 protected void Table(MigrationActionType action, string tableName, Action <string> createAction)
 {
     if (action == MigrationActionType.Up)
     {
         createAction(tableName);
     }
     else
     {
         DropTable(tableName);
     }
 }
Exemple #3
0
 protected void ActualView(MigrationActionType action, string tableName, string viewName, string[] properties, string[] keys, Func <SqlViewModel, SqlViewModel> sqlAction = null, bool isRegister = false, bool isSimple = false)
 {
     if (action == MigrationActionType.Up)
     {
         var viewModel = new SqlViewModel(viewName.GetViewName()).Init(tableName, properties, keys, isRegister, isSimple, true);
         this.ActualEntitiesView(sqlAction != null ? sqlAction(viewModel) : viewModel);
     }
     else
     {
         this.DropView(tableName.GetViewName());
     }
 }
Exemple #4
0
 public MigrationMessage(MigrationActionType action, Exception exception)
     : this(action, CreateMessage(exception))
 {
     Exception = exception;
 }
Exemple #5
0
 public MigrationMessage(MigrationActionType action, string message)
     : this()
 {
     Action  = action;
     Message = message;
 }
 public MigrationMessage(MigrationActionType action, Exception exception)
     : this(action, CreateMessage(exception))
 {
     Exception = exception;
 }
 public MigrationMessage(MigrationActionType action, string message)
     : this()
 {
     Action = action;
     Message = message;
 }