/// <summary> /// Deletes the record from the migration table. /// </summary> public virtual void Delete() { var migrationRecord = MigrationRecord.Find(this.Uuid); if (migrationRecord == null) { throw new InvalidDataException(string.Format("The migration {0} cannot be deleted from the migration table.", this.Name)); } migrationRecord.Delete(); }
/// <summary> /// Checks whether the migration should execute. /// </summary> /// <returns>True if the migration should run.</returns> public virtual bool ShouldMigrate() { return(MigrationRecord.Find(this.Uuid) == null); }