From 76b04e674b5468520f62d114ce09aab110e35714 Mon Sep 17 00:00:00 2001 From: Dao Yu Lai Date: Tue, 3 Dec 2024 14:58:49 -0800 Subject: [PATCH] MMI-3116 Removed redundant migration scripts --- libs/net/dal/Configuration/SeriesConfiguration.cs | 2 +- libs/net/dal/Configuration/SourceConfiguration.cs | 2 +- .../Migrations/1.3.8/Down/PostDown/00-source-series.sql | 7 ------- .../dal/Migrations/1.3.8/Up/PostUp/00-source-series.sql | 7 ------- 4 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 libs/net/dal/Migrations/1.3.8/Down/PostDown/00-source-series.sql delete mode 100644 libs/net/dal/Migrations/1.3.8/Up/PostUp/00-source-series.sql diff --git a/libs/net/dal/Configuration/SeriesConfiguration.cs b/libs/net/dal/Configuration/SeriesConfiguration.cs index 6ceeba8f64..d932926de7 100644 --- a/libs/net/dal/Configuration/SeriesConfiguration.cs +++ b/libs/net/dal/Configuration/SeriesConfiguration.cs @@ -12,7 +12,7 @@ public override void Configure(EntityTypeBuilder builder) builder.Property(m => m.SourceId).IsRequired(false); builder.Property(m => m.AutoTranscribe).IsRequired(); builder.Property(m => m.UseInTopics).IsRequired(); - builder.Property(m => m.IsCBRASource); + builder.Property(m => m.IsCBRASource).IsRequired(); builder.HasOne(m => m.Source).WithMany(m => m.Series).HasForeignKey(m => m.SourceId).OnDelete(DeleteBehavior.Cascade); builder.HasMany(m => m.MediaTypeSearchMappings).WithMany(m => m.SeriesSearchMappings).UsingEntity(); diff --git a/libs/net/dal/Configuration/SourceConfiguration.cs b/libs/net/dal/Configuration/SourceConfiguration.cs index 5506c980cd..90574aec1c 100644 --- a/libs/net/dal/Configuration/SourceConfiguration.cs +++ b/libs/net/dal/Configuration/SourceConfiguration.cs @@ -21,7 +21,7 @@ public override void Configure(EntityTypeBuilder builder) builder.Property(m => m.DisableTranscribe).IsRequired(); builder.Property(m => m.UseInTopics).IsRequired(); builder.Property(m => m.Configuration).IsRequired().HasColumnType("jsonb").HasDefaultValueSql("'{}'::jsonb"); - builder.Property(m => m.IsCBRASource); + builder.Property(m => m.IsCBRASource).IsRequired(); builder.HasOne(m => m.Owner).WithMany().HasForeignKey(m => m.OwnerId).OnDelete(DeleteBehavior.SetNull); builder.HasOne(m => m.License).WithMany(m => m.Sources).HasForeignKey(m => m.LicenseId).OnDelete(DeleteBehavior.Restrict); diff --git a/libs/net/dal/Migrations/1.3.8/Down/PostDown/00-source-series.sql b/libs/net/dal/Migrations/1.3.8/Down/PostDown/00-source-series.sql deleted file mode 100644 index 1f2c039cd5..0000000000 --- a/libs/net/dal/Migrations/1.3.8/Down/PostDown/00-source-series.sql +++ /dev/null @@ -1,7 +0,0 @@ -DO $$ -BEGIN - -ALTER TABLE public."source" DROP COLUMN "is_cbra_source"; -ALTER TABLE public."series" DROP COLUMN "is_cbra_source"; - -END $$; diff --git a/libs/net/dal/Migrations/1.3.8/Up/PostUp/00-source-series.sql b/libs/net/dal/Migrations/1.3.8/Up/PostUp/00-source-series.sql deleted file mode 100644 index dc6cac01a9..0000000000 --- a/libs/net/dal/Migrations/1.3.8/Up/PostUp/00-source-series.sql +++ /dev/null @@ -1,7 +0,0 @@ -DO $$ -BEGIN - -ALTER TABLE public."source" ADD COLUMN "is_cbra_source" boolean NOT NULL DEFAULT false; -ALTER TABLE public."series" ADD COLUMN "is_cbra_source" boolean NOT NULL DEFAULT false; - -END $$;