mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 10:11:10 +00:00
Adds the SSD content setting to the library model and persistence
Stores whether the content of a library is on a solid state drive, off by default, so scans can choose between parallel and sequential reads.
This commit is contained in:
1 parent
6e77cf3302
commit
6eac3d578e
6 files changed
+3962
No files matched your search
@@ -79,6 +79,10 @@ public class LibraryConfiguration : IEntityTypeConfiguration<LibraryEntity>
|
||||
.HasDefaultValue(null)
|
||||
.HasColumnOrder(17);
|
||||
|
||||
builder.Property(library => library.IsContentOnSsd)
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnOrder(18);
|
||||
|
||||
// one user with many libraries
|
||||
builder.HasOne(library => library.User)
|
||||
.WithMany(user => user.Libraries)
|
||||
|
||||
Generated
+3902
File diff suppressed because it is too large.
Load diff
+30
@@ -0,0 +1,30 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Lumina.DataAccess.Common.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddsIsContentOnSsdToLibraries : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsContentOnSsd",
|
||||
table: "Libraries",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false)
|
||||
.Annotation("Relational:ColumnOrder", 18);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsContentOnSsd",
|
||||
table: "Libraries");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1521,6 +1521,12 @@ namespace Lumina.DataAccess.Common.Migrations
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnOrder(12);
|
||||
|
||||
b.Property<bool>("IsContentOnSsd")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnOrder(18);
|
||||
|
||||
b.Property<bool>("IsEnabled")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
|
||||
Reference in new issue
Block a user