Exemplo n.º 1
0
 private void HandleNotSupportedByDialectException(MigrationInfo migrationInfo, NotSupportedByDialect nse)
 {
     if (IgnoreDialectNotSupportedActions) {
         Log.Warn(
             String.Format(
                 "Migration[{0}] NotSupportedException not thrown due user config. Dialect: {1} Function: {2} Msg: {3}",
                 migrationInfo.Name, nse.DialectName, nse.FunctionName, nse.Message));
         return;
     }
     throw nse;
 }
Exemplo n.º 2
0
 private void UpdateCurrentVersion(MigrationInfo migrationInfo, Direction direction)
 {
     if (direction == Direction.Up) {
         VersionRepository.InsertVersion(migrationInfo);
     }
     else {
         VersionRepository.RemoveVersion(migrationInfo);
     }
 }
 public MigrationPlanStep(Direction down, MigrationInfo migrationInfo, bool shouldUpdateVersion = true)
 {
     Direction = down;
     MigrationInfo = migrationInfo;
     ShouldUpdateVersion = shouldUpdateVersion;
 }
Exemplo n.º 4
0
 public MigrationPlanStep(Direction down, MigrationInfo migrationInfo, bool shouldUpdateVersion = true)
 {
     Direction           = down;
     MigrationInfo       = migrationInfo;
     ShouldUpdateVersion = shouldUpdateVersion;
 }
 public virtual void RemoveVersion(MigrationInfo migrationInfo)
 {
     var filterGroup = Filter.Eq("migrationgroup", MigrationGroup);
     var filterVersion = Filter.Eq("version", migrationInfo.Version);
     _dataClient.Delete
                .From(VERSION_TABLE_NAME)
                .Where(Filter.And(filterGroup, filterVersion));
     _dataClient.Commit();
 }
 public virtual void InsertVersion(MigrationInfo migrationInfo)
 {
     EnsureMigrationGroup();
     _dataClient.Insert
         .Into(VERSION_TABLE_NAME)
         .Columns("migrationgroup", "version", "info", "applied")
         .Values(MigrationGroup, migrationInfo.Version, migrationInfo.Name, DateTime.Now);
     _dataClient.Commit();
 }