diff --git a/AStar.Dev.Infrastructure.AppDb/AStar.Dev.Infrastructure.AppDb.xml b/AStar.Dev.Infrastructure.AppDb/AStar.Dev.Infrastructure.AppDb.xml
index e01811f..06d7700 100644
--- a/AStar.Dev.Infrastructure.AppDb/AStar.Dev.Infrastructure.AppDb.xml
+++ b/AStar.Dev.Infrastructure.AppDb/AStar.Dev.Infrastructure.AppDb.xml
@@ -58,12 +58,6 @@
-
- EF Core configuration for .
-
-
-
-
EF Core configuration for .
@@ -734,12 +728,6 @@
Primary key.
-
- Foreign key to the parent scrape configuration.
-
-
- Navigation property to the parent scrape configuration.
-
The SQLite connection string used to store scraped data.
@@ -1071,42 +1059,12 @@
Indicates that the rule is an exclusion rule, meaning that files or folders matching this rule should be excluded from the synchronization process. This allows users to specify certain items that they do not want to be synchronized, effectively ignoring them during the sync operation.
-
- The root configuration entity for the scraper, aggregating connection, user, search, and directory settings.
-
-
- Primary key.
-
-
- The connection strings required by the scraper.
-
-
- The user authentication details for the target website.
-
-
- The search parameters for the scraper.
-
-
- The directories the scraper reads from and writes to.
-
-
- Provides methods for querying the scrape configuration.
-
-
- Retrieves the most recent scrape configuration, including its connection strings, user configuration, search configuration with categories, and scrape directories.
-
The directories the scraper reads from and writes scraped data to.
Primary key.
-
- Foreign key to the parent scrape configuration.
-
-
- Navigation property to the parent scrape configuration.
-
The root directory under which all scraped data is organised.
@@ -1175,12 +1133,6 @@
Primary key.
-
- Foreign key to the parent scrape configuration.
-
-
- Navigation property to the parent scrape configuration.
-
The base URL of the target website.
@@ -1578,12 +1530,6 @@
Primary key.
-
- Foreign key to the parent scrape configuration.
-
-
- Navigation property to the parent scrape configuration.
-
The login email address for the target website.
@@ -1741,6 +1687,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
Custom -derived type for the NonAlphaPattern method.
diff --git a/AStar.Dev.Infrastructure.AppDb/AppDbContext.cs b/AStar.Dev.Infrastructure.AppDb/AppDbContext.cs
index 8f19c25..405faa1 100644
--- a/AStar.Dev.Infrastructure.AppDb/AppDbContext.cs
+++ b/AStar.Dev.Infrastructure.AppDb/AppDbContext.cs
@@ -18,7 +18,6 @@ public sealed class AppDbContext(DbContextOptions options) : DbCon
public DbSet FileClassificationKeywords => Set();
public DbSet TagsToIgnore => Set();
public DbSet ModelsToIgnore => Set();
- public DbSet ScrapeConfiguration => Set();
public DbSet SearchConfigurations => Set();
public DbSet ScrapedTags => Set();
diff --git a/AStar.Dev.Infrastructure.AppDb/Configuration/ConnectionStringsEntityConfiguration.cs b/AStar.Dev.Infrastructure.AppDb/Configuration/ConnectionStringsEntityConfiguration.cs
index 863e333..b317395 100644
--- a/AStar.Dev.Infrastructure.AppDb/Configuration/ConnectionStringsEntityConfiguration.cs
+++ b/AStar.Dev.Infrastructure.AppDb/Configuration/ConnectionStringsEntityConfiguration.cs
@@ -12,8 +12,6 @@ public void Configure(EntityTypeBuilder builder)
{
_ = builder.ToTable("ConnectionStrings");
_ = builder.HasKey(connectionStrings => connectionStrings.Id);
- _ = builder.HasIndex(connectionStrings => connectionStrings.ScrapeConfigurationEntityId).IsUnique();
- _ = builder.Property(connectionStrings => connectionStrings.ScrapeConfigurationEntityId).IsRequired();
_ = builder.Property(connectionStrings => connectionStrings.Sqlite).HasMaxLength(256).IsRequired();
}
}
diff --git a/AStar.Dev.Infrastructure.AppDb/Configuration/ScrapeConfigurationEntityConfiguration.cs b/AStar.Dev.Infrastructure.AppDb/Configuration/ScrapeConfigurationEntityConfiguration.cs
deleted file mode 100644
index 714d3c9..0000000
--- a/AStar.Dev.Infrastructure.AppDb/Configuration/ScrapeConfigurationEntityConfiguration.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using AStar.Dev.Infrastructure.AppDb.Entities;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata.Builders;
-
-namespace AStar.Dev.Infrastructure.AppDb.Configuration;
-
-/// EF Core configuration for .
-public sealed class ScrapeConfigurationEntityConfiguration : IEntityTypeConfiguration
-{
- ///
- public void Configure(EntityTypeBuilder builder)
- {
- _ = builder.ToTable("ScrapeConfiguration");
- _ = builder.HasKey(config => config.Id);
-
- _ = builder.HasOne(config => config.ConnectionStrings)
- .WithOne(connectionStrings => connectionStrings.ScrapeConfigurationEntity)
- .HasForeignKey(connectionStrings => connectionStrings.ScrapeConfigurationEntityId)
- .IsRequired()
- .OnDelete(DeleteBehavior.Cascade);
-
- _ = builder.HasOne(config => config.UserConfiguration)
- .WithOne(userConfiguration => userConfiguration.ScrapeConfigurationEntity)
- .HasForeignKey(userConfiguration => userConfiguration.ScrapeConfigurationEntityId)
- .IsRequired()
- .OnDelete(DeleteBehavior.Cascade);
-
- _ = builder.HasOne(config => config.SearchConfiguration)
- .WithOne(searchConfiguration => searchConfiguration.ScrapeConfigurationEntity)
- .HasForeignKey(searchConfiguration => searchConfiguration.ScrapeConfigurationEntityId)
- .IsRequired()
- .OnDelete(DeleteBehavior.Cascade);
-
- _ = builder.HasOne(config => config.ScrapeDirectories)
- .WithOne(scrapeDirectories => scrapeDirectories.ScrapeConfigurationEntity)
- .HasForeignKey(scrapeDirectories => scrapeDirectories.ScrapeConfigurationEntityId)
- .IsRequired()
- .OnDelete(DeleteBehavior.Cascade);
- }
-}
diff --git a/AStar.Dev.Infrastructure.AppDb/Configuration/ScrapeDirectoriesEntityConfiguration.cs b/AStar.Dev.Infrastructure.AppDb/Configuration/ScrapeDirectoriesEntityConfiguration.cs
index f0664e8..9677c6f 100644
--- a/AStar.Dev.Infrastructure.AppDb/Configuration/ScrapeDirectoriesEntityConfiguration.cs
+++ b/AStar.Dev.Infrastructure.AppDb/Configuration/ScrapeDirectoriesEntityConfiguration.cs
@@ -12,8 +12,6 @@ public void Configure(EntityTypeBuilder builder)
{
_ = builder.ToTable("ScrapeDirectories");
_ = builder.HasKey(scrapeDirectories => scrapeDirectories.Id);
- _ = builder.HasIndex(scrapeDirectories => scrapeDirectories.ScrapeConfigurationEntityId).IsUnique();
- _ = builder.Property(scrapeDirectories => scrapeDirectories.ScrapeConfigurationEntityId).IsRequired();
_ = builder.Property(scrapeDirectories => scrapeDirectories.RootDirectory).HasMaxLength(256);
_ = builder.Property(scrapeDirectories => scrapeDirectories.BaseSaveDirectory).HasMaxLength(256);
_ = builder.Property(scrapeDirectories => scrapeDirectories.BaseDirectory).HasMaxLength(256);
diff --git a/AStar.Dev.Infrastructure.AppDb/Configuration/SearchConfigurationEntityConfiguration.cs b/AStar.Dev.Infrastructure.AppDb/Configuration/SearchConfigurationEntityConfiguration.cs
index 15c2b5b..2c96497 100644
--- a/AStar.Dev.Infrastructure.AppDb/Configuration/SearchConfigurationEntityConfiguration.cs
+++ b/AStar.Dev.Infrastructure.AppDb/Configuration/SearchConfigurationEntityConfiguration.cs
@@ -12,8 +12,6 @@ public void Configure(EntityTypeBuilder builder)
{
_ = builder.ToTable("SearchConfiguration");
_ = builder.HasKey(searchConfiguration => searchConfiguration.Id);
- _ = builder.HasIndex(searchConfiguration => searchConfiguration.ScrapeConfigurationEntityId).IsUnique();
- _ = builder.Property(searchConfiguration => searchConfiguration.ScrapeConfigurationEntityId).IsRequired();
_ = builder.Property(searchConfiguration => searchConfiguration.BaseUrl)
.HasConversion(uri => uri.ToString(), value => new Uri(value))
diff --git a/AStar.Dev.Infrastructure.AppDb/Configuration/UserConfigurationEntityConfiguration.cs b/AStar.Dev.Infrastructure.AppDb/Configuration/UserConfigurationEntityConfiguration.cs
index ed8c11f..498c2d7 100644
--- a/AStar.Dev.Infrastructure.AppDb/Configuration/UserConfigurationEntityConfiguration.cs
+++ b/AStar.Dev.Infrastructure.AppDb/Configuration/UserConfigurationEntityConfiguration.cs
@@ -12,8 +12,6 @@ public void Configure(EntityTypeBuilder builder)
{
_ = builder.ToTable("UserConfiguration");
_ = builder.HasKey(userConfiguration => userConfiguration.Id);
- _ = builder.HasIndex(userConfiguration => userConfiguration.ScrapeConfigurationEntityId).IsUnique();
- _ = builder.Property(userConfiguration => userConfiguration.ScrapeConfigurationEntityId).IsRequired();
_ = builder.Property(userConfiguration => userConfiguration.Username).HasMaxLength(256).IsRequired();
_ = builder.Property(userConfiguration => userConfiguration.LoginEmailAddress).HasMaxLength(256).IsRequired();
_ = builder.Property(userConfiguration => userConfiguration.Password).HasMaxLength(256).IsRequired();
diff --git a/AStar.Dev.Infrastructure.AppDb/Entities/ConnectionStringsEntity.cs b/AStar.Dev.Infrastructure.AppDb/Entities/ConnectionStringsEntity.cs
index 81d1e81..637b7f6 100644
--- a/AStar.Dev.Infrastructure.AppDb/Entities/ConnectionStringsEntity.cs
+++ b/AStar.Dev.Infrastructure.AppDb/Entities/ConnectionStringsEntity.cs
@@ -6,12 +6,6 @@ public sealed class ConnectionStringsEntity : AuditableEntity
/// Primary key.
public int Id { get; set; }
- /// Foreign key to the parent scrape configuration.
- public int ScrapeConfigurationEntityId { get; set; }
-
- /// Navigation property to the parent scrape configuration.
- public ScrapeConfigurationEntity? ScrapeConfigurationEntity { get; set; }
-
/// The SQLite connection string used to store scraped data.
public string Sqlite { get; set; } = string.Empty;
}
diff --git a/AStar.Dev.Infrastructure.AppDb/Entities/ScrapeConfigurationEntity.cs b/AStar.Dev.Infrastructure.AppDb/Entities/ScrapeConfigurationEntity.cs
deleted file mode 100644
index 22c7d80..0000000
--- a/AStar.Dev.Infrastructure.AppDb/Entities/ScrapeConfigurationEntity.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-namespace AStar.Dev.Infrastructure.AppDb.Entities;
-
-/// The root configuration entity for the scraper, aggregating connection, user, search, and directory settings.
-public sealed class ScrapeConfigurationEntity : AuditableEntity
-{
- /// Primary key.
- public int Id { get; set; }
-
- /// The connection strings required by the scraper.
- public ConnectionStringsEntity ConnectionStrings { get; set; } = new();
-
- /// The user authentication details for the target website.
- public UserConfigurationEntity UserConfiguration { get; set; } = new();
-
- /// The search parameters for the scraper.
- public SearchConfigurationEntity SearchConfiguration { get; set; } = new();
-
- /// The directories the scraper reads from and writes to.
- public ScrapeDirectoriesEntity ScrapeDirectories { get; set; } = new();
-}
diff --git a/AStar.Dev.Infrastructure.AppDb/Entities/ScrapeConfigurationQueries.cs b/AStar.Dev.Infrastructure.AppDb/Entities/ScrapeConfigurationQueries.cs
deleted file mode 100644
index 9241ef6..0000000
--- a/AStar.Dev.Infrastructure.AppDb/Entities/ScrapeConfigurationQueries.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-
-namespace AStar.Dev.Infrastructure.AppDb.Entities;
-
-/// Provides methods for querying the scrape configuration.
-public static class ScrapeConfigurationQueries
-{
- /// Retrieves the most recent scrape configuration, including its connection strings, user configuration, search configuration with categories, and scrape directories.
- public static ScrapeConfigurationEntity GetScrapeConfigurations(this DbSet configurations)
- => configurations
- .Include(e => e.ConnectionStrings)
- .Include(e => e.UserConfiguration)
- .Include(e => e.SearchConfiguration).ThenInclude(s => s.SearchCategories)
- .Include(e => e.ScrapeDirectories)
- .OrderByDescending(e => e.Id)
- .First();
-}
diff --git a/AStar.Dev.Infrastructure.AppDb/Entities/ScrapeDirectoriesEntity.cs b/AStar.Dev.Infrastructure.AppDb/Entities/ScrapeDirectoriesEntity.cs
index 58e8e29..d563ccc 100644
--- a/AStar.Dev.Infrastructure.AppDb/Entities/ScrapeDirectoriesEntity.cs
+++ b/AStar.Dev.Infrastructure.AppDb/Entities/ScrapeDirectoriesEntity.cs
@@ -6,12 +6,6 @@ public sealed class ScrapeDirectoriesEntity : AuditableEntity
/// Primary key.
public int Id { get; set; }
- /// Foreign key to the parent scrape configuration.
- public int ScrapeConfigurationEntityId { get; set; }
-
- /// Navigation property to the parent scrape configuration.
- public ScrapeConfigurationEntity? ScrapeConfigurationEntity { get; set; }
-
/// The root directory under which all scraped data is organised.
public string RootDirectory { get; set; } = string.Empty;
diff --git a/AStar.Dev.Infrastructure.AppDb/Entities/SearchConfigurationEntity.cs b/AStar.Dev.Infrastructure.AppDb/Entities/SearchConfigurationEntity.cs
index 0b6383b..1aac8b1 100644
--- a/AStar.Dev.Infrastructure.AppDb/Entities/SearchConfigurationEntity.cs
+++ b/AStar.Dev.Infrastructure.AppDb/Entities/SearchConfigurationEntity.cs
@@ -6,12 +6,6 @@ public sealed class SearchConfigurationEntity : AuditableEntity
/// Primary key.
public int Id { get; set; }
- /// Foreign key to the parent scrape configuration.
- public int ScrapeConfigurationEntityId { get; set; }
-
- /// Navigation property to the parent scrape configuration.
- public ScrapeConfigurationEntity? ScrapeConfigurationEntity { get; set; }
-
/// The base URL of the target website.
public Uri BaseUrl { get; set; } = new("https://example.com");
diff --git a/AStar.Dev.Infrastructure.AppDb/Entities/UserConfigurationEntity.cs b/AStar.Dev.Infrastructure.AppDb/Entities/UserConfigurationEntity.cs
index 62e3295..0be20da 100644
--- a/AStar.Dev.Infrastructure.AppDb/Entities/UserConfigurationEntity.cs
+++ b/AStar.Dev.Infrastructure.AppDb/Entities/UserConfigurationEntity.cs
@@ -6,12 +6,6 @@ public sealed class UserConfigurationEntity : AuditableEntity
/// Primary key.
public int Id { get; set; }
- /// Foreign key to the parent scrape configuration.
- public int ScrapeConfigurationEntityId { get; set; }
-
- /// Navigation property to the parent scrape configuration.
- public ScrapeConfigurationEntity? ScrapeConfigurationEntity { get; set; }
-
/// The login email address for the target website.
public string LoginEmailAddress { get; set; } = string.Empty;
diff --git a/AStar.Dev.Infrastructure.AppDb/Migrations/20260714201453_RemoveScrapeConfigurationTable.Designer.cs b/AStar.Dev.Infrastructure.AppDb/Migrations/20260714201453_RemoveScrapeConfigurationTable.Designer.cs
new file mode 100644
index 0000000..2fd65b7
--- /dev/null
+++ b/AStar.Dev.Infrastructure.AppDb/Migrations/20260714201453_RemoveScrapeConfigurationTable.Designer.cs
@@ -0,0 +1,1071 @@
+//
+using System;
+using System.Collections.Generic;
+using AStar.Dev.Infrastructure.AppDb;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace AStar.Dev.Infrastructure.AppDb.Migrations
+{
+ [DbContext(typeof(AppDbContext))]
+ [Migration("20260714201453_RemoveScrapeConfigurationTable")]
+ partial class RemoveScrapeConfigurationTable
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "10.0.9");
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.AccountEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("AccentIndex")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsActive")
+ .HasColumnType("INTEGER");
+
+ b.Property("LastSyncedAt")
+ .HasColumnType("INTEGER");
+
+ b.ComplexProperty(typeof(Dictionary), "Profile", "AStar.Dev.Infrastructure.AppDb.Entities.AccountEntity.Profile#AccountProfile", b1 =>
+ {
+ b1.IsRequired();
+
+ b1.Property("DisplayName")
+ .IsRequired()
+ .HasColumnType("TEXT")
+ .HasColumnName("DisplayName");
+
+ b1.Property("Email")
+ .IsRequired()
+ .HasColumnType("TEXT")
+ .HasColumnName("Email");
+ });
+
+ b.ComplexProperty(typeof(Dictionary), "Quota", "AStar.Dev.Infrastructure.AppDb.Entities.AccountEntity.Quota#StorageQuota", b1 =>
+ {
+ b1.IsRequired();
+
+ b1.Property("TotalBytes")
+ .HasColumnType("INTEGER")
+ .HasColumnName("QuotaTotal");
+
+ b1.Property("UsedBytes")
+ .HasColumnType("INTEGER")
+ .HasColumnName("QuotaUsed");
+ });
+
+ b.ComplexProperty(typeof(Dictionary), "SyncConfig", "AStar.Dev.Infrastructure.AppDb.Entities.AccountEntity.SyncConfig#AccountSyncConfig", b1 =>
+ {
+ b1.IsRequired();
+
+ b1.Property("ConflictPolicy")
+ .HasColumnType("INTEGER")
+ .HasColumnName("ConflictPolicy");
+
+ b1.Property("LocalSyncPath")
+ .IsRequired()
+ .HasColumnType("TEXT")
+ .HasColumnName("LocalSyncPath");
+ });
+
+ b.HasKey("Id");
+
+ b.ToTable("Accounts");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.ConnectionStringsEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("CreatedAt_Ticks");
+
+ b.Property("Sqlite")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("UpdatedAt_Ticks");
+
+ b.HasKey("Id");
+
+ b.ToTable("ConnectionStrings", (string)null);
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.DeletionStatusEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("HardDeletePending")
+ .HasColumnType("INTEGER")
+ .HasColumnName("HardDeletePending_Ticks");
+
+ b.Property("SoftDeletePending")
+ .HasColumnType("INTEGER")
+ .HasColumnName("SoftDeletePending_Ticks");
+
+ b.Property("SoftDeleted")
+ .HasColumnType("INTEGER")
+ .HasColumnName("SoftDeleted_Ticks");
+
+ b.HasKey("Id");
+
+ b.ToTable("DeletionStatus", (string)null);
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.DriveStateEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("AccountId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("DeltaLink")
+ .HasColumnType("TEXT");
+
+ b.Property("LastSyncStartedAt")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AccountId")
+ .IsUnique();
+
+ b.ToTable("DriveStates");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.EventEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("DirectoryName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("EventOccurredAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("EventOccurredAt_Ticks");
+
+ b.Property("FileCreated")
+ .HasColumnType("INTEGER")
+ .HasColumnName("FileCreated_Ticks");
+
+ b.Property("FileLastModified")
+ .HasColumnType("INTEGER")
+ .HasColumnName("FileLastModified_Ticks");
+
+ b.Property("FileName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("FileSize")
+ .HasColumnType("INTEGER");
+
+ b.Property("Handle")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("Height")
+ .HasColumnType("INTEGER");
+
+ b.Property("Type")
+ .HasColumnType("INTEGER");
+
+ b.Property("UpdatedBy")
+ .IsRequired()
+ .HasMaxLength(30)
+ .HasColumnType("TEXT");
+
+ b.Property("Width")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("Event", (string)null);
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.FileAccessDetailEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("DetailsLastUpdated")
+ .HasColumnType("INTEGER")
+ .HasColumnName("DetailsLastUpdated_Ticks");
+
+ b.Property("LastViewed")
+ .HasColumnType("INTEGER")
+ .HasColumnName("LastViewed_Ticks");
+
+ b.Property("MoveRequired")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("FileAccessDetail", (string)null);
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.FileClassificationCategoryEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("IncludeInSearch")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsFamous")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsInternet")
+ .HasColumnType("INTEGER");
+
+ b.Property("Level")
+ .HasColumnType("INTEGER");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("ParentId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name");
+
+ b.HasIndex("ParentId", "Name")
+ .IsUnique();
+
+ b.ToTable("FileClassificationCategories");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.FileClassificationEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CategoryId")
+ .HasColumnType("INTEGER");
+
+ b.Property("FileDetailId")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CategoryId");
+
+ b.HasIndex("FileDetailId", "CategoryId")
+ .IsUnique();
+
+ b.ToTable("FileClassifications", (string)null);
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.FileClassificationKeywordEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CategoryId")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsFamous")
+ .HasColumnType("INTEGER");
+
+ b.Property("IsInternet")
+ .HasColumnType("INTEGER");
+
+ b.Property("Keyword")
+ .IsRequired()
+ .HasMaxLength(150)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CategoryId", "Keyword")
+ .IsUnique();
+
+ b.ToTable("FileClassificationKeywords");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.FileDetailEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("DeletionStatusId")
+ .HasColumnType("INTEGER");
+
+ b.Property("FileAccessDetailId")
+ .HasColumnType("INTEGER");
+
+ b.Property("FileHandle")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("FileSize")
+ .HasColumnType("INTEGER");
+
+ b.Property("Height")
+ .HasColumnType("INTEGER");
+
+ b.Property("ImageDetailId")
+ .HasColumnType("TEXT");
+
+ b.Property("IsImage")
+ .HasColumnType("INTEGER");
+
+ b.Property("Width")
+ .HasColumnType("INTEGER");
+
+ b.ComplexProperty(typeof(Dictionary), "DirectoryName", "AStar.Dev.Infrastructure.AppDb.Entities.FileDetailEntity.DirectoryName#DirectoryName", b1 =>
+ {
+ b1.IsRequired();
+
+ b1.Property("Value")
+ .IsRequired()
+ .HasColumnType("TEXT")
+ .HasColumnName("DirectoryName");
+ });
+
+ b.ComplexProperty(typeof(Dictionary), "FileName", "AStar.Dev.Infrastructure.AppDb.Entities.FileDetailEntity.FileName#FileName", b1 =>
+ {
+ b1.IsRequired();
+
+ b1.Property("Value")
+ .IsRequired()
+ .HasColumnType("TEXT")
+ .HasColumnName("FileName");
+ });
+
+ b.HasKey("Id");
+
+ b.HasIndex("DeletionStatusId");
+
+ b.HasIndex("FileAccessDetailId");
+
+ b.HasIndex("FileHandle")
+ .IsUnique();
+
+ b.HasIndex("FileSize");
+
+ b.HasIndex("ImageDetailId");
+
+ b.HasIndex("IsImage", "FileSize")
+ .HasDatabaseName("IX_FileDetail_DuplicateImages");
+
+ b.ToTable("FileDetail", (string)null);
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.ImageDetailEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("Height")
+ .HasColumnType("INTEGER");
+
+ b.Property("Width")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("ImageDetail", (string)null);
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.ModelToIgnoreEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("CreatedAt_Ticks");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("UpdatedAt_Ticks");
+
+ b.Property("Value")
+ .IsRequired()
+ .HasMaxLength(300)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("ModelToIgnore", (string)null);
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.ScrapeDirectoriesEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("BaseDirectory")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("BaseDirectoryFamous")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("BaseSaveDirectory")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("CreatedAt_Ticks");
+
+ b.Property("RootDirectory")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("SubDirectoryName")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("UpdatedAt_Ticks");
+
+ b.HasKey("Id");
+
+ b.ToTable("ScrapeDirectories", (string)null);
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.ScrapedTagEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("Category")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("CreatedAt_Ticks");
+
+ b.Property("IncludeInSearch")
+ .HasColumnType("INTEGER");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("UpdatedAt_Ticks");
+
+ b.Property("Value")
+ .IsRequired()
+ .HasMaxLength(300)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Value")
+ .IsUnique();
+
+ b.ToTable("ScrapedTag", (string)null);
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SearchCategoryEntity", b =>
+ {
+ b.Property("SearchConfigurationId")
+ .HasColumnType("INTEGER");
+
+ b.Property("Id")
+ .HasMaxLength(128)
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("CreatedAt_Ticks");
+
+ b.Property("IncludeInSearch")
+ .HasColumnType("INTEGER");
+
+ b.Property("LastKnownImageCount")
+ .HasColumnType("INTEGER");
+
+ b.Property("LastPageVisited")
+ .HasColumnType("INTEGER");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("TotalPages")
+ .HasColumnType("INTEGER");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("UpdatedAt_Ticks");
+
+ b.HasKey("SearchConfigurationId", "Id");
+
+ b.ToTable("SearchCategories", (string)null);
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SearchConfigurationEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("ApiKey")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("BaseUrl")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("CreatedAt_Ticks");
+
+ b.Property("ImagePauseInSeconds")
+ .HasColumnType("INTEGER");
+
+ b.Property("LoginUrl")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("SearchString")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("SearchStringPrefix")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("SearchStringSuffix")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("SlowMotionDelay")
+ .HasColumnType("REAL");
+
+ b.Property("StartingPageNumber")
+ .HasColumnType("INTEGER");
+
+ b.Property("Subscriptions")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("SubscriptionsStartingPageNumber")
+ .HasColumnType("INTEGER");
+
+ b.Property("SubscriptionsTotalPages")
+ .HasColumnType("INTEGER");
+
+ b.Property("TopWallpapers")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("TopWallpapersStartingPageNumber")
+ .HasColumnType("INTEGER");
+
+ b.Property("TopWallpapersTotalPages")
+ .HasColumnType("INTEGER");
+
+ b.Property("TotalPages")
+ .HasColumnType("INTEGER");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("UpdatedAt_Ticks");
+
+ b.Property("UseHeadless")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.ToTable("SearchConfiguration", (string)null);
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SyncConflictEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("BLOB");
+
+ b.Property("AccountId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("DetectedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("DetectedAt_Ticks");
+
+ b.Property("FolderId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("LocalModified")
+ .HasColumnType("INTEGER")
+ .HasColumnName("LocalModified_Ticks");
+
+ b.Property("LocalPath")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("LocalSize")
+ .HasColumnType("INTEGER");
+
+ b.Property("RelativePath")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("RemoteItemId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("RemoteModified")
+ .HasColumnType("INTEGER")
+ .HasColumnName("RemoteModified_Ticks");
+
+ b.Property("RemoteSize")
+ .HasColumnType("INTEGER");
+
+ b.Property("Resolution")
+ .HasColumnType("INTEGER");
+
+ b.Property("ResolvedAt")
+ .HasColumnType("INTEGER");
+
+ b.Property("State")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AccountId", "State");
+
+ b.ToTable("SyncConflicts");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SyncJobEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("BLOB");
+
+ b.Property("AccountId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("CompletedAt")
+ .HasColumnType("INTEGER");
+
+ b.Property("Direction")
+ .HasColumnType("INTEGER");
+
+ b.Property("DownloadUrl")
+ .HasColumnType("TEXT");
+
+ b.Property("ErrorMessage")
+ .HasColumnType("TEXT");
+
+ b.Property("FileSize")
+ .HasColumnType("INTEGER");
+
+ b.Property("FolderId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("LocalPath")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("QueuedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("QueuedAt_Ticks");
+
+ b.Property("RelativePath")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("RemoteItemId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("RemoteModified")
+ .HasColumnType("INTEGER")
+ .HasColumnName("RemoteModified_Ticks");
+
+ b.Property("State")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AccountId", "State");
+
+ b.ToTable("SyncJobs");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SyncRuleEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("AccountId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("RemoteItemId")
+ .HasColumnType("TEXT");
+
+ b.Property("RemotePath")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("RuleType")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AccountId", "RemotePath")
+ .IsUnique();
+
+ b.ToTable("SyncRules");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SyncedItemEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("AccountId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("FileDetailId")
+ .HasColumnType("TEXT");
+
+ b.Property("IsFolder")
+ .HasColumnType("INTEGER");
+
+ b.Property("LocalPath")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("RemoteItemId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("RemoteModifiedAt")
+ .HasColumnType("TEXT");
+
+ b.Property("RemoteParentId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("RemotePath")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property("SizeInBytes")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("FileDetailId");
+
+ b.HasIndex("LocalPath");
+
+ b.HasIndex("RemotePath");
+
+ b.HasIndex("SizeInBytes");
+
+ b.HasIndex("AccountId", "LocalPath");
+
+ b.HasIndex("AccountId", "RemoteItemId")
+ .IsUnique();
+
+ b.HasIndex("AccountId", "SizeInBytes");
+
+ b.HasIndex("AccountId", "IsFolder", "RemotePath");
+
+ b.HasIndex("AccountId", "IsFolder", "SizeInBytes");
+
+ b.ToTable("SyncedItems");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.TagToIgnoreEntity", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("TEXT");
+
+ b.Property("CreatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("CreatedAt_Ticks");
+
+ b.Property("IgnoreImage")
+ .HasColumnType("INTEGER");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("UpdatedAt_Ticks");
+
+ b.Property("Value")
+ .IsRequired()
+ .HasMaxLength(300)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("TagToIgnore", (string)null);
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.UserConfigurationEntity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property("CreatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("CreatedAt_Ticks");
+
+ b.Property("LoginEmailAddress")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("Password")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("SessionCookie")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.Property("UpdatedAt")
+ .HasColumnType("INTEGER")
+ .HasColumnName("UpdatedAt_Ticks");
+
+ b.Property("Username")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("UserConfiguration", (string)null);
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.DriveStateEntity", b =>
+ {
+ b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.AccountEntity", "Account")
+ .WithOne()
+ .HasForeignKey("AStar.Dev.Infrastructure.AppDb.Entities.DriveStateEntity", "AccountId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Account");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.FileClassificationCategoryEntity", b =>
+ {
+ b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.FileClassificationCategoryEntity", "Parent")
+ .WithMany()
+ .HasForeignKey("ParentId");
+
+ b.Navigation("Parent");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.FileClassificationEntity", b =>
+ {
+ b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.FileClassificationCategoryEntity", "Category")
+ .WithMany()
+ .HasForeignKey("CategoryId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.FileDetailEntity", "FileDetail")
+ .WithMany()
+ .HasForeignKey("FileDetailId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Category");
+
+ b.Navigation("FileDetail");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.FileClassificationKeywordEntity", b =>
+ {
+ b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.FileClassificationCategoryEntity", "Category")
+ .WithMany()
+ .HasForeignKey("CategoryId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Category");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.FileDetailEntity", b =>
+ {
+ b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.DeletionStatusEntity", "DeletionStatus")
+ .WithMany()
+ .HasForeignKey("DeletionStatusId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.FileAccessDetailEntity", "FileAccessDetail")
+ .WithMany()
+ .HasForeignKey("FileAccessDetailId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.ImageDetailEntity", "ImageDetail")
+ .WithMany()
+ .HasForeignKey("ImageDetailId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("DeletionStatus");
+
+ b.Navigation("FileAccessDetail");
+
+ b.Navigation("ImageDetail");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SearchCategoryEntity", b =>
+ {
+ b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.SearchConfigurationEntity", "SearchConfiguration")
+ .WithMany("SearchCategories")
+ .HasForeignKey("SearchConfigurationId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("SearchConfiguration");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SyncConflictEntity", b =>
+ {
+ b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.AccountEntity", "Account")
+ .WithMany()
+ .HasForeignKey("AccountId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Account");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SyncJobEntity", b =>
+ {
+ b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.AccountEntity", "Account")
+ .WithMany()
+ .HasForeignKey("AccountId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Account");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SyncRuleEntity", b =>
+ {
+ b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.AccountEntity", "Account")
+ .WithMany()
+ .HasForeignKey("AccountId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Account");
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SyncedItemEntity", b =>
+ {
+ b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.AccountEntity", "Account")
+ .WithMany()
+ .HasForeignKey("AccountId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.FileDetailEntity", "FileDetail")
+ .WithMany()
+ .HasForeignKey("FileDetailId")
+ .OnDelete(DeleteBehavior.SetNull);
+
+ b.OwnsOne("AStar.Dev.Infrastructure.AppDb.Entities.VersionInfo", "Tags", b1 =>
+ {
+ b1.Property("SyncedItemEntityId")
+ .HasColumnType("INTEGER");
+
+ b1.Property("CTag")
+ .HasColumnType("TEXT")
+ .HasColumnName("CTag");
+
+ b1.Property("ETag")
+ .HasColumnType("TEXT")
+ .HasColumnName("ETag");
+
+ b1.HasKey("SyncedItemEntityId");
+
+ b1.ToTable("SyncedItems");
+
+ b1.WithOwner()
+ .HasForeignKey("SyncedItemEntityId");
+ });
+
+ b.Navigation("Account");
+
+ b.Navigation("FileDetail");
+
+ b.Navigation("Tags")
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SearchConfigurationEntity", b =>
+ {
+ b.Navigation("SearchCategories");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/AStar.Dev.Infrastructure.AppDb/Migrations/20260714201453_RemoveScrapeConfigurationTable.cs b/AStar.Dev.Infrastructure.AppDb/Migrations/20260714201453_RemoveScrapeConfigurationTable.cs
new file mode 100644
index 0000000..c046af1
--- /dev/null
+++ b/AStar.Dev.Infrastructure.AppDb/Migrations/20260714201453_RemoveScrapeConfigurationTable.cs
@@ -0,0 +1,167 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace AStar.Dev.Infrastructure.AppDb.Migrations
+{
+ ///
+ public partial class RemoveScrapeConfigurationTable : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_ConnectionStrings_ScrapeConfiguration_ScrapeConfigurationEntityId",
+ table: "ConnectionStrings");
+
+ migrationBuilder.DropForeignKey(
+ name: "FK_ScrapeDirectories_ScrapeConfiguration_ScrapeConfigurationEntityId",
+ table: "ScrapeDirectories");
+
+ migrationBuilder.DropForeignKey(
+ name: "FK_SearchConfiguration_ScrapeConfiguration_ScrapeConfigurationEntityId",
+ table: "SearchConfiguration");
+
+ migrationBuilder.DropForeignKey(
+ name: "FK_UserConfiguration_ScrapeConfiguration_ScrapeConfigurationEntityId",
+ table: "UserConfiguration");
+
+ migrationBuilder.DropTable(
+ name: "ScrapeConfiguration");
+
+ migrationBuilder.DropIndex(
+ name: "IX_UserConfiguration_ScrapeConfigurationEntityId",
+ table: "UserConfiguration");
+
+ migrationBuilder.DropIndex(
+ name: "IX_SearchConfiguration_ScrapeConfigurationEntityId",
+ table: "SearchConfiguration");
+
+ migrationBuilder.DropIndex(
+ name: "IX_ScrapeDirectories_ScrapeConfigurationEntityId",
+ table: "ScrapeDirectories");
+
+ migrationBuilder.DropIndex(
+ name: "IX_ConnectionStrings_ScrapeConfigurationEntityId",
+ table: "ConnectionStrings");
+
+ migrationBuilder.DropColumn(
+ name: "ScrapeConfigurationEntityId",
+ table: "UserConfiguration");
+
+ migrationBuilder.DropColumn(
+ name: "ScrapeConfigurationEntityId",
+ table: "SearchConfiguration");
+
+ migrationBuilder.DropColumn(
+ name: "ScrapeConfigurationEntityId",
+ table: "ScrapeDirectories");
+
+ migrationBuilder.DropColumn(
+ name: "ScrapeConfigurationEntityId",
+ table: "ConnectionStrings");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AddColumn(
+ name: "ScrapeConfigurationEntityId",
+ table: "UserConfiguration",
+ type: "INTEGER",
+ nullable: false,
+ defaultValue: 0);
+
+ migrationBuilder.AddColumn(
+ name: "ScrapeConfigurationEntityId",
+ table: "SearchConfiguration",
+ type: "INTEGER",
+ nullable: false,
+ defaultValue: 0);
+
+ migrationBuilder.AddColumn(
+ name: "ScrapeConfigurationEntityId",
+ table: "ScrapeDirectories",
+ type: "INTEGER",
+ nullable: false,
+ defaultValue: 0);
+
+ migrationBuilder.AddColumn(
+ name: "ScrapeConfigurationEntityId",
+ table: "ConnectionStrings",
+ type: "INTEGER",
+ nullable: false,
+ defaultValue: 0);
+
+ migrationBuilder.CreateTable(
+ name: "ScrapeConfiguration",
+ columns: table => new
+ {
+ Id = table.Column(type: "INTEGER", nullable: false)
+ .Annotation("Sqlite:Autoincrement", true),
+ CreatedAt_Ticks = table.Column(type: "INTEGER", nullable: false),
+ UpdatedAt_Ticks = table.Column(type: "INTEGER", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_ScrapeConfiguration", x => x.Id);
+ });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_UserConfiguration_ScrapeConfigurationEntityId",
+ table: "UserConfiguration",
+ column: "ScrapeConfigurationEntityId",
+ unique: true);
+
+ migrationBuilder.CreateIndex(
+ name: "IX_SearchConfiguration_ScrapeConfigurationEntityId",
+ table: "SearchConfiguration",
+ column: "ScrapeConfigurationEntityId",
+ unique: true);
+
+ migrationBuilder.CreateIndex(
+ name: "IX_ScrapeDirectories_ScrapeConfigurationEntityId",
+ table: "ScrapeDirectories",
+ column: "ScrapeConfigurationEntityId",
+ unique: true);
+
+ migrationBuilder.CreateIndex(
+ name: "IX_ConnectionStrings_ScrapeConfigurationEntityId",
+ table: "ConnectionStrings",
+ column: "ScrapeConfigurationEntityId",
+ unique: true);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_ConnectionStrings_ScrapeConfiguration_ScrapeConfigurationEntityId",
+ table: "ConnectionStrings",
+ column: "ScrapeConfigurationEntityId",
+ principalTable: "ScrapeConfiguration",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_ScrapeDirectories_ScrapeConfiguration_ScrapeConfigurationEntityId",
+ table: "ScrapeDirectories",
+ column: "ScrapeConfigurationEntityId",
+ principalTable: "ScrapeConfiguration",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_SearchConfiguration_ScrapeConfiguration_ScrapeConfigurationEntityId",
+ table: "SearchConfiguration",
+ column: "ScrapeConfigurationEntityId",
+ principalTable: "ScrapeConfiguration",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_UserConfiguration_ScrapeConfiguration_ScrapeConfigurationEntityId",
+ table: "UserConfiguration",
+ column: "ScrapeConfigurationEntityId",
+ principalTable: "ScrapeConfiguration",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ }
+ }
+}
diff --git a/AStar.Dev.Infrastructure.AppDb/Migrations/AppDbContextModelSnapshot.cs b/AStar.Dev.Infrastructure.AppDb/Migrations/AppDbContextModelSnapshot.cs
index 94cbd63..88f6d26 100644
--- a/AStar.Dev.Infrastructure.AppDb/Migrations/AppDbContextModelSnapshot.cs
+++ b/AStar.Dev.Infrastructure.AppDb/Migrations/AppDbContextModelSnapshot.cs
@@ -89,9 +89,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasColumnType("INTEGER")
.HasColumnName("CreatedAt_Ticks");
- b.Property("ScrapeConfigurationEntityId")
- .HasColumnType("INTEGER");
-
b.Property("Sqlite")
.IsRequired()
.HasMaxLength(256)
@@ -103,9 +100,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.HasKey("Id");
- b.HasIndex("ScrapeConfigurationEntityId")
- .IsUnique();
-
b.ToTable("ConnectionStrings", (string)null);
});
@@ -425,25 +419,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("ModelToIgnore", (string)null);
});
- modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.ScrapeConfigurationEntity", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("CreatedAt")
- .HasColumnType("INTEGER")
- .HasColumnName("CreatedAt_Ticks");
-
- b.Property("UpdatedAt")
- .HasColumnType("INTEGER")
- .HasColumnName("UpdatedAt_Ticks");
-
- b.HasKey("Id");
-
- b.ToTable("ScrapeConfiguration", (string)null);
- });
-
modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.ScrapeDirectoriesEntity", b =>
{
b.Property("Id")
@@ -474,9 +449,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasMaxLength(256)
.HasColumnType("TEXT");
- b.Property("ScrapeConfigurationEntityId")
- .HasColumnType("INTEGER");
-
b.Property("SubDirectoryName")
.IsRequired()
.HasMaxLength(256)
@@ -488,9 +460,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.HasKey("Id");
- b.HasIndex("ScrapeConfigurationEntityId")
- .IsUnique();
-
b.ToTable("ScrapeDirectories", (string)null);
});
@@ -594,9 +563,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasMaxLength(256)
.HasColumnType("TEXT");
- b.Property("ScrapeConfigurationEntityId")
- .HasColumnType("INTEGER");
-
b.Property("SearchString")
.IsRequired()
.HasMaxLength(256)
@@ -652,9 +618,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.HasKey("Id");
- b.HasIndex("ScrapeConfigurationEntityId")
- .IsUnique();
-
b.ToTable("SearchConfiguration", (string)null);
});
@@ -913,9 +876,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasMaxLength(256)
.HasColumnType("TEXT");
- b.Property("ScrapeConfigurationEntityId")
- .HasColumnType("INTEGER");
-
b.Property("SessionCookie")
.IsRequired()
.HasMaxLength(256)
@@ -932,23 +892,9 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.HasKey("Id");
- b.HasIndex("ScrapeConfigurationEntityId")
- .IsUnique();
-
b.ToTable("UserConfiguration", (string)null);
});
- modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.ConnectionStringsEntity", b =>
- {
- b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.ScrapeConfigurationEntity", "ScrapeConfigurationEntity")
- .WithOne("ConnectionStrings")
- .HasForeignKey("AStar.Dev.Infrastructure.AppDb.Entities.ConnectionStringsEntity", "ScrapeConfigurationEntityId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("ScrapeConfigurationEntity");
- });
-
modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.DriveStateEntity", b =>
{
b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.AccountEntity", "Account")
@@ -1026,17 +972,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Navigation("ImageDetail");
});
- modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.ScrapeDirectoriesEntity", b =>
- {
- b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.ScrapeConfigurationEntity", "ScrapeConfigurationEntity")
- .WithOne("ScrapeDirectories")
- .HasForeignKey("AStar.Dev.Infrastructure.AppDb.Entities.ScrapeDirectoriesEntity", "ScrapeConfigurationEntityId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("ScrapeConfigurationEntity");
- });
-
modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SearchCategoryEntity", b =>
{
b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.SearchConfigurationEntity", "SearchConfiguration")
@@ -1048,17 +983,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Navigation("SearchConfiguration");
});
- modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SearchConfigurationEntity", b =>
- {
- b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.ScrapeConfigurationEntity", "ScrapeConfigurationEntity")
- .WithOne("SearchConfiguration")
- .HasForeignKey("AStar.Dev.Infrastructure.AppDb.Entities.SearchConfigurationEntity", "ScrapeConfigurationEntityId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("ScrapeConfigurationEntity");
- });
-
modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SyncConflictEntity", b =>
{
b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.AccountEntity", "Account")
@@ -1134,32 +1058,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.IsRequired();
});
- modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.UserConfigurationEntity", b =>
- {
- b.HasOne("AStar.Dev.Infrastructure.AppDb.Entities.ScrapeConfigurationEntity", "ScrapeConfigurationEntity")
- .WithOne("UserConfiguration")
- .HasForeignKey("AStar.Dev.Infrastructure.AppDb.Entities.UserConfigurationEntity", "ScrapeConfigurationEntityId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("ScrapeConfigurationEntity");
- });
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.ScrapeConfigurationEntity", b =>
- {
- b.Navigation("ConnectionStrings")
- .IsRequired();
-
- b.Navigation("ScrapeDirectories")
- .IsRequired();
-
- b.Navigation("SearchConfiguration")
- .IsRequired();
-
- b.Navigation("UserConfiguration")
- .IsRequired();
- });
-
modelBuilder.Entity("AStar.Dev.Infrastructure.AppDb.Entities.SearchConfigurationEntity", b =>
{
b.Navigation("SearchCategories");
diff --git a/AStar.Dev.Infrastructure.AppDb/ModelBuilderExtensions.cs b/AStar.Dev.Infrastructure.AppDb/ModelBuilderExtensions.cs
index ff5ddb1..a8d3f0c 100644
--- a/AStar.Dev.Infrastructure.AppDb/ModelBuilderExtensions.cs
+++ b/AStar.Dev.Infrastructure.AppDb/ModelBuilderExtensions.cs
@@ -22,7 +22,6 @@ public static void UseSqliteFriendlyConversions(this ModelBuilder modelBuilder)
typeof(TagToIgnoreEntity),
typeof(ModelToIgnoreEntity),
typeof(ScrapedTagEntity),
- typeof(ScrapeConfigurationEntity),
typeof(ConnectionStringsEntity),
typeof(UserConfigurationEntity),
typeof(SearchConfigurationEntity),