Migrations: fix small error
This commit is contained in:
parent
294e50409c
commit
46ea085acf
|
@ -62,8 +62,6 @@ public static class Migrations {
|
|||
db.InsertWithIdentity(new DbInfo { DbVer = 0 });
|
||||
}
|
||||
|
||||
var dbinfo = db.DbInfo.First();
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||
Console.WriteLine($"Database version: {db.DbInfo.ToList().First().DbVer}");
|
||||
|
||||
|
@ -74,8 +72,12 @@ public static class Migrations {
|
|||
}
|
||||
else {
|
||||
migrationsToRun.ForEach(RunMigration);
|
||||
|
||||
var newdb = new AppDb.DbConn();
|
||||
var dbinfo = newdb.DbInfo.First();
|
||||
dbinfo.DbVer = DbVer;
|
||||
db.Update(dbinfo);
|
||||
newdb.Update(dbinfo);
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.DarkGreen;
|
||||
Console.WriteLine($"Database version is now: {DbVer}");
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
|
|
Loading…
Reference in New Issue