confighantering. connection t postgres. test av import

This commit is contained in:
2025-09-06 16:53:23 +02:00
parent 1744a5b7de
commit 8c54a120d1
9 changed files with 341 additions and 22 deletions

View File

@@ -6,5 +6,6 @@
public string CalibreDb { get; set; } = String.Empty;
public string CalibreRoot { get; set; } = String.Empty;
public string BibblanConnection { get; set; } = String.Empty;
}
}

View File

@@ -15,8 +15,8 @@ namespace Bibblan.Models
public long Id { get; set; }
public string Title { get; set; }
public string Sort { get; set; }
public string Timestamp { get; set; }
public string Pubdate { get; set; }
public DateTime Timestamp { get; set; }
public DateTime Pubdate { get; set; }
public double SeriesIndex { get; set; }
public string AuthorSort { get; set; }
public string Isbn { get; set; }
@@ -24,8 +24,8 @@ namespace Bibblan.Models
public string Path { get; set; }
public long Flags { get; set; }
public string Uuid { get; set; }
public string HasCover { get; set; }
public string LastModified { get; set; }
public bool HasCover { get; set; }
public DateTime LastModified { get; set; }
}
public partial class BooksAuthorsLink
@@ -101,11 +101,11 @@ namespace Bibblan.Models
public string Label { get; set; }
public string Name { get; set; }
public string Datatype { get; set; }
public string MarkForDelete { get; set; }
public string Editable { get; set; }
public bool MarkForDelete { get; set; }
public bool Editable { get; set; }
public string Display { get; set; }
public string IsMultiple { get; set; }
public string Normalized { get; set; }
public bool IsMultiple { get; set; }
public bool Normalized { get; set; }
}
public partial class Data
@@ -161,7 +161,7 @@ namespace Bibblan.Models
{
public long Id { get; set; }
public string Name { get; set; }
public string Sort { get; set; }
public string? Sort { get; set; }
}
public partial class Ratings
@@ -183,7 +183,7 @@ namespace Bibblan.Models
public string Name { get; set; }
}
public partial class CalibreContext : DbContext
public partial class BaseContext : DbContext
{
public virtual DbSet<Authors> Authors { get; set; }
public virtual DbSet<Books> Books { get; set; }
@@ -209,7 +209,7 @@ namespace Bibblan.Models
public virtual DbSet<Series> Series { get; set; }
public virtual DbSet<Tags> Tags { get; set; }
public CalibreContext(DbContextOptions<CalibreContext> options) : base(options)
public BaseContext(DbContextOptions options) : base(options)
{
}
@@ -762,4 +762,20 @@ namespace Bibblan.Models
});
}
}
public partial class SqliteCalibreContext : BaseContext
{
public SqliteCalibreContext(DbContextOptions<SqliteCalibreContext> options) : base(options)
{
}
}
public partial class PostgresCalibreContext : BaseContext
{
public PostgresCalibreContext(DbContextOptions<PostgresCalibreContext> options) : base(options)
{
}
}
}