Skip to content

Commit

Permalink
Fixed the startup error
Browse files Browse the repository at this point in the history
  • Loading branch information
tidusjar committed Nov 15, 2019
1 parent 58cc49d commit 3bd9b18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
10 changes: 3 additions & 7 deletions src/Ombi.Store/Context/Sqlite/ExternalSqliteContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ public ExternalSqliteContext(DbContextOptions<ExternalSqliteContext> options) :
_created = true;
Upgrade();
Database.SetCommandTimeout(60);
try
{
Database.Migrate();
}
catch (SqliteException e) when (e.Message.Equals("duplicate column name: RequestId"))
{
}

Database.Migrate();

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ public partial class RequestIdPatch : Migration
protected override void Up(MigrationBuilder migrationBuilder)
{

migrationBuilder.AddColumn<int>(
name: "RequestId",
table: "PlexServerContent",
nullable: true);
//migrationBuilder.AddColumn<int>(
// name: "RequestId",
// table: "PlexServerContent",
// nullable: true);
}

protected override void Down(MigrationBuilder migrationBuilder)
Expand Down

0 comments on commit 3bd9b18

Please sign in to comment.