Remove SQLite specific schema condition from migrations

pull/9926/head
Bogdan 4 months ago
parent c12f01f919
commit ff0a04c331

@ -1,4 +1,4 @@
using FluentMigrator; using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework; using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration namespace NzbDrone.Core.Datastore.Migration
@ -8,7 +8,7 @@ namespace NzbDrone.Core.Datastore.Migration
{ {
protected override void MainDbUpgrade() protected override void MainDbUpgrade()
{ {
if (!Schema.Schema("dbo").Table("NetImport").Exists()) if (!Schema.Table("NetImport").Exists())
{ {
Create.TableForModel("NetImport") Create.TableForModel("NetImport")
.WithColumn("Enabled").AsBoolean() .WithColumn("Enabled").AsBoolean()

@ -1,6 +1,4 @@
using FluentMigrator; using FluentMigrator;
// using FluentMigrator.Expressions;
using NzbDrone.Core.Datastore.Migration.Framework; using NzbDrone.Core.Datastore.Migration.Framework;
using NzbDrone.Core.Movies; using NzbDrone.Core.Movies;
@ -11,12 +9,12 @@ namespace NzbDrone.Core.Datastore.Migration
{ {
protected override void MainDbUpgrade() 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); 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); Alter.Table("Movies").AddColumn("MinimumAvailability").AsInt32().WithDefaultValue((int)MovieStatusType.Released);
} }

@ -13,7 +13,7 @@ namespace NzbDrone.Core.Datastore.Migration
{ {
protected override void MainDbUpgrade() protected override void MainDbUpgrade()
{ {
if (!Schema.Schema("dbo").Table("ImportExclusions").Exists()) if (!Schema.Table("ImportExclusions").Exists())
{ {
Create.TableForModel("ImportExclusions") Create.TableForModel("ImportExclusions")
.WithColumn("TmdbId").AsInt64().NotNullable().Unique().PrimaryKey() .WithColumn("TmdbId").AsInt64().NotNullable().Unique().PrimaryKey()

@ -1,4 +1,4 @@
using FluentMigrator; using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework; using NzbDrone.Core.Datastore.Migration.Framework;
namespace NzbDrone.Core.Datastore.Migration namespace NzbDrone.Core.Datastore.Migration
@ -8,7 +8,7 @@ namespace NzbDrone.Core.Datastore.Migration
{ {
protected override void MainDbUpgrade() protected override void MainDbUpgrade()
{ {
if (!Schema.Schema("dbo").Table("alternative_titles").Exists()) if (!Schema.Table("alternative_titles").Exists())
{ {
Create.TableForModel("AlternativeTitles") Create.TableForModel("AlternativeTitles")
.WithColumn("MovieId").AsInt64().NotNullable() .WithColumn("MovieId").AsInt64().NotNullable()

Loading…
Cancel
Save