mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
parent
ad9f242b5c
commit
07c95f06d3
@ -54,15 +54,18 @@ public override void Up()
|
||||
switch (Context.MigrationType)
|
||||
{
|
||||
case MigrationType.Main:
|
||||
_logger.Info("Starting migration to " + Version);
|
||||
LogMigrationMessage(MigrationType.Main);
|
||||
MainDbUpgrade();
|
||||
return;
|
||||
case MigrationType.Log:
|
||||
_logger.Info("Starting migration to " + Version);
|
||||
LogMigrationMessage(MigrationType.Log);
|
||||
LogDbUpgrade();
|
||||
return;
|
||||
default:
|
||||
LogMigrationMessage(MigrationType.Log);
|
||||
LogDbUpgrade();
|
||||
|
||||
LogMigrationMessage(MigrationType.Main);
|
||||
MainDbUpgrade();
|
||||
return;
|
||||
}
|
||||
@ -72,5 +75,10 @@ public override void Down()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private void LogMigrationMessage(MigrationType type)
|
||||
{
|
||||
_logger.Info("Starting migration of {0} DB to {1}", type.ToString(), Version);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user