mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 04:22:30 +01:00
New: Log which DB is being migrated
(cherry picked from commit 07c95f06d3b9b32aaeb923d4c678f10a2bf1141a)
This commit is contained in:
parent
672b37c319
commit
4f8b0dd5cc
@ -41,15 +41,18 @@ public override void Up()
|
|||||||
switch (MigrationContext.Current.MigrationType)
|
switch (MigrationContext.Current.MigrationType)
|
||||||
{
|
{
|
||||||
case MigrationType.Main:
|
case MigrationType.Main:
|
||||||
_logger.Info("Starting migration to " + Version);
|
LogMigrationMessage(MigrationType.Main);
|
||||||
MainDbUpgrade();
|
MainDbUpgrade();
|
||||||
return;
|
return;
|
||||||
case MigrationType.Log:
|
case MigrationType.Log:
|
||||||
_logger.Info("Starting migration to " + Version);
|
LogMigrationMessage(MigrationType.Log);
|
||||||
LogDbUpgrade();
|
LogDbUpgrade();
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
|
LogMigrationMessage(MigrationType.Log);
|
||||||
LogDbUpgrade();
|
LogDbUpgrade();
|
||||||
|
|
||||||
|
LogMigrationMessage(MigrationType.Main);
|
||||||
MainDbUpgrade();
|
MainDbUpgrade();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -59,5 +62,10 @@ public override void Down()
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
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