Fix Database migratioon on build
This commit is contained in:
@@ -327,6 +327,8 @@ using (var scope = app.Services.CreateScope())
|
|||||||
|
|
||||||
static void EnsureColumn(DbConnection c, string table, string column, string ddl)
|
static void EnsureColumn(DbConnection c, string table, string column, string ddl)
|
||||||
{
|
{
|
||||||
|
// Fresh databases won't have the table until EF migrations run.
|
||||||
|
if (!HasTable(c, table)) return;
|
||||||
if (!HasColumn(c, table, column)) Exec(c, ddl);
|
if (!HasColumn(c, table, column)) Exec(c, ddl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user