mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 08:16:05 -07:00
Updated where we update the request blobs schema change
This commit is contained in:
parent
a776f5c36d
commit
4e1a668d3c
1 changed files with 14 additions and 14 deletions
|
@ -60,6 +60,7 @@ namespace PlexRequests.Core
|
|||
if (version > 1300 && version <= 1699)
|
||||
{
|
||||
MigrateDbFrom1300();
|
||||
UpdateRequestBlobsTable();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,20 +84,7 @@ namespace PlexRequests.Core
|
|||
}
|
||||
|
||||
var version = schema.SchemaVersion;
|
||||
if (version == 0)
|
||||
{
|
||||
connection.UpdateSchemaVersion(status.DBVersion);
|
||||
try
|
||||
{
|
||||
TableCreation.AlterTable(Db.DbConnection(), "RequestBlobs", "ADD COLUMN", "MusicId", false, "TEXT");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("Tried updating the schema to version 1");
|
||||
Log.Error(e);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
|
@ -160,6 +148,18 @@ namespace PlexRequests.Core
|
|||
}
|
||||
}
|
||||
|
||||
private void UpdateRequestBlobsTable() // TODO: Remove in v1.7
|
||||
{
|
||||
try
|
||||
{
|
||||
TableCreation.AlterTable(Db.DbConnection(), "RequestBlobs", "ADD COLUMN", "MusicId", false, "TEXT");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error("Tried updating the schema to alter the request blobs table");
|
||||
Log.Error(e);
|
||||
}
|
||||
}
|
||||
private void MigrateDbFrom1300() // TODO: Remove in v1.7
|
||||
{
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue