mirror of
https://github.com/Radarr/Radarr
synced 2026-03-04 03:23:13 +01:00
Remove SQLite specific schema condition from migrations
This commit is contained in:
parent
c12f01f919
commit
ff0a04c331
4 changed files with 7 additions and 9 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using FluentMigrator;
|
||||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
|
|
@ -8,7 +8,7 @@ public class create_netimport_table : NzbDroneMigrationBase
|
|||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
if (!Schema.Schema("dbo").Table("NetImport").Exists())
|
||||
if (!Schema.Table("NetImport").Exists())
|
||||
{
|
||||
Create.TableForModel("NetImport")
|
||||
.WithColumn("Enabled").AsBoolean()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
using FluentMigrator;
|
||||
|
||||
// using FluentMigrator.Expressions;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
using NzbDrone.Core.Movies;
|
||||
|
||||
|
|
@ -11,12 +9,12 @@ public class add_minimumavailability : NzbDroneMigrationBase
|
|||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
if (!Schema.Schema("dbo").Table("NetImport").Column("MinimumAvailability").Exists())
|
||||
if (!Schema.Table("NetImport").Column("MinimumAvailability").Exists())
|
||||
{
|
||||
Alter.Table("NetImport").AddColumn("MinimumAvailability").AsInt32().WithDefaultValue((int)MovieStatusType.Released);
|
||||
}
|
||||
|
||||
if (!Schema.Schema("dbo").Table("Movies").Column("MinimumAvailability").Exists())
|
||||
if (!Schema.Table("Movies").Column("MinimumAvailability").Exists())
|
||||
{
|
||||
Alter.Table("Movies").AddColumn("MinimumAvailability").AsInt32().WithDefaultValue((int)MovieStatusType.Released);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ public class add_import_exclusions_table : NzbDroneMigrationBase
|
|||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
if (!Schema.Schema("dbo").Table("ImportExclusions").Exists())
|
||||
if (!Schema.Table("ImportExclusions").Exists())
|
||||
{
|
||||
Create.TableForModel("ImportExclusions")
|
||||
.WithColumn("TmdbId").AsInt64().NotNullable().Unique().PrimaryKey()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using FluentMigrator;
|
||||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
|
|
@ -8,7 +8,7 @@ public class add_alternative_titles_table : NzbDroneMigrationBase
|
|||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
if (!Schema.Schema("dbo").Table("alternative_titles").Exists())
|
||||
if (!Schema.Table("alternative_titles").Exists())
|
||||
{
|
||||
Create.TableForModel("AlternativeTitles")
|
||||
.WithColumn("MovieId").AsInt64().NotNullable()
|
||||
|
|
|
|||
Loading…
Reference in a new issue