mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Code restyling.
This commit is contained in:
@@ -37,7 +37,7 @@ namespace Aaru.Database
|
||||
{
|
||||
public sealed class AaruContext : DbContext
|
||||
{
|
||||
public AaruContext(DbContextOptions options) : base(options) { }
|
||||
public AaruContext(DbContextOptions options) : base(options) {}
|
||||
|
||||
public DbSet<Device> Devices { get; set; }
|
||||
public DbSet<Report> Reports { get; set; }
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,47 +9,47 @@ namespace Aaru.Database.Migrations
|
||||
{
|
||||
migrationBuilder.DropTable("Reports");
|
||||
|
||||
migrationBuilder.CreateTable("Reports",
|
||||
table => new
|
||||
{
|
||||
Id =
|
||||
table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
USBId = table.Column<int>(nullable: true),
|
||||
FireWireId = table.Column<int>(nullable: true),
|
||||
PCMCIAId = table.Column<int>(nullable: true),
|
||||
CompactFlash = table.Column<bool>(nullable: false),
|
||||
ATAId = table.Column<int>(nullable: true),
|
||||
ATAPIId = table.Column<int>(nullable: true),
|
||||
SCSIId = table.Column<int>(nullable: true),
|
||||
MultiMediaCardId = table.Column<int>(nullable: true),
|
||||
SecureDigitalId = table.Column<int>(nullable: true),
|
||||
Manufacturer = table.Column<string>(nullable: true),
|
||||
Model = table.Column<string>(nullable: true),
|
||||
Revision = table.Column<string>(nullable: true),
|
||||
Type = table.Column<int>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Devices", x => x.Id);
|
||||
table.ForeignKey("FK_Reports_Ata_ATAId", x => x.ATAId, "Ata", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("FK_Reports_Ata_ATAPIId", x => x.ATAPIId, "Ata", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("FK_Reports_FireWire_FireWireId", x => x.FireWireId,
|
||||
"FireWire", "Id", onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("FK_Reports_MmcSd_MultiMediaCardId",
|
||||
x => x.MultiMediaCardId, "MmcSd", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("FK_Reports_Pcmcia_PCMCIAId", x => x.PCMCIAId, "Pcmcia",
|
||||
"Id", onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("FK_Reports_Scsi_SCSIId", x => x.SCSIId, "Scsi", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("FK_Reports_MmcSd_SecureDigitalId",
|
||||
x => x.SecureDigitalId, "MmcSd", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("FK_Reports_Usb_USBId", x => x.USBId, "Usb", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.CreateTable("Reports", table => new
|
||||
{
|
||||
Id = table.Column<int>().Annotation("Sqlite:Autoincrement", true),
|
||||
USBId = table.Column<int>(nullable: true),
|
||||
FireWireId = table.Column<int>(nullable: true),
|
||||
PCMCIAId = table.Column<int>(nullable: true), CompactFlash = table.Column<bool>(),
|
||||
ATAId = table.Column<int>(nullable: true),
|
||||
ATAPIId = table.Column<int>(nullable: true),
|
||||
SCSIId = table.Column<int>(nullable: true),
|
||||
MultiMediaCardId = table.Column<int>(nullable: true),
|
||||
SecureDigitalId = table.Column<int>(nullable: true),
|
||||
Manufacturer = table.Column<string>(nullable: true), Model = table.Column<string>(nullable: true),
|
||||
Revision = table.Column<string>(nullable: true), Type = table.Column<int>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Devices", x => x.Id);
|
||||
|
||||
table.ForeignKey("FK_Reports_Ata_ATAId", x => x.ATAId, "Ata", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
table.ForeignKey("FK_Reports_Ata_ATAPIId", x => x.ATAPIId, "Ata", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
table.ForeignKey("FK_Reports_FireWire_FireWireId", x => x.FireWireId, "FireWire", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
table.ForeignKey("FK_Reports_MmcSd_MultiMediaCardId", x => x.MultiMediaCardId, "MmcSd", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
table.ForeignKey("FK_Reports_Pcmcia_PCMCIAId", x => x.PCMCIAId, "Pcmcia", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
table.ForeignKey("FK_Reports_Scsi_SCSIId", x => x.SCSIId, "Scsi", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
table.ForeignKey("FK_Reports_MmcSd_SecureDigitalId", x => x.SecureDigitalId, "MmcSd", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
table.ForeignKey("FK_Reports_Usb_USBId", x => x.USBId, "Usb", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>("Created", "Reports", nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0,
|
||||
@@ -57,48 +57,48 @@ namespace Aaru.Database.Migrations
|
||||
|
||||
migrationBuilder.AddColumn<bool>("Uploaded", "Reports", nullable: false, defaultValue: false);
|
||||
|
||||
migrationBuilder.CreateTable("Devices",
|
||||
table => new
|
||||
{
|
||||
Id =
|
||||
table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
USBId = table.Column<int>(nullable: true),
|
||||
FireWireId = table.Column<int>(nullable: true),
|
||||
PCMCIAId = table.Column<int>(nullable: true),
|
||||
CompactFlash = table.Column<bool>(nullable: false),
|
||||
ATAId = table.Column<int>(nullable: true),
|
||||
ATAPIId = table.Column<int>(nullable: true),
|
||||
SCSIId = table.Column<int>(nullable: true),
|
||||
MultiMediaCardId = table.Column<int>(nullable: true),
|
||||
SecureDigitalId = table.Column<int>(nullable: true),
|
||||
Manufacturer = table.Column<string>(nullable: true),
|
||||
Model = table.Column<string>(nullable: true),
|
||||
Revision = table.Column<string>(nullable: true),
|
||||
Type = table.Column<int>(nullable: false),
|
||||
LastSynchronized = table.Column<DateTime>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Devices", x => x.Id);
|
||||
table.ForeignKey("FK_Devices_Ata_ATAId", x => x.ATAId, "Ata", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("FK_Devices_Ata_ATAPIId", x => x.ATAPIId, "Ata", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("FK_Devices_FireWire_FireWireId", x => x.FireWireId,
|
||||
"FireWire", "Id", onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("FK_Devices_MmcSd_MultiMediaCardId",
|
||||
x => x.MultiMediaCardId, "MmcSd", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("FK_Devices_Pcmcia_PCMCIAId", x => x.PCMCIAId, "Pcmcia",
|
||||
"Id", onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("FK_Devices_Scsi_SCSIId", x => x.SCSIId, "Scsi", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("FK_Devices_MmcSd_SecureDigitalId",
|
||||
x => x.SecureDigitalId, "MmcSd", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey("FK_Devices_Usb_USBId", x => x.USBId, "Usb", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.CreateTable("Devices", table => new
|
||||
{
|
||||
Id = table.Column<int>().Annotation("Sqlite:Autoincrement", true),
|
||||
USBId = table.Column<int>(nullable: true),
|
||||
FireWireId = table.Column<int>(nullable: true),
|
||||
PCMCIAId = table.Column<int>(nullable: true), CompactFlash = table.Column<bool>(),
|
||||
ATAId = table.Column<int>(nullable: true),
|
||||
ATAPIId = table.Column<int>(nullable: true),
|
||||
SCSIId = table.Column<int>(nullable: true),
|
||||
MultiMediaCardId = table.Column<int>(nullable: true),
|
||||
SecureDigitalId = table.Column<int>(nullable: true),
|
||||
Manufacturer = table.Column<string>(nullable: true), Model = table.Column<string>(nullable: true),
|
||||
Revision = table.Column<string>(nullable: true), Type = table.Column<int>(),
|
||||
LastSynchronized = table.Column<DateTime>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Devices", x => x.Id);
|
||||
|
||||
table.ForeignKey("FK_Devices_Ata_ATAId", x => x.ATAId, "Ata", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
table.ForeignKey("FK_Devices_Ata_ATAPIId", x => x.ATAPIId, "Ata", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
table.ForeignKey("FK_Devices_FireWire_FireWireId", x => x.FireWireId, "FireWire", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
table.ForeignKey("FK_Devices_MmcSd_MultiMediaCardId", x => x.MultiMediaCardId, "MmcSd", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
table.ForeignKey("FK_Devices_Pcmcia_PCMCIAId", x => x.PCMCIAId, "Pcmcia", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
table.ForeignKey("FK_Devices_Scsi_SCSIId", x => x.SCSIId, "Scsi", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
table.ForeignKey("FK_Devices_MmcSd_SecureDigitalId", x => x.SecureDigitalId, "MmcSd", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
table.ForeignKey("FK_Devices_Usb_USBId", x => x.USBId, "Usb", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex("IX_Devices_ATAId", "Devices", "ATAId");
|
||||
|
||||
|
||||
@@ -6,52 +6,50 @@ namespace Aaru.Database.Migrations
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable("Commands",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Synchronized = table.Column<bool>(nullable: false)
|
||||
}, constraints: table => { table.PrimaryKey("PK_Commands", x => x.Id); });
|
||||
migrationBuilder.CreateTable("Commands", table => new
|
||||
{
|
||||
Id = table.Column<int>().Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(nullable: true), Synchronized = table.Column<bool>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Commands", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("Filesystems",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Synchronized = table.Column<bool>(nullable: false)
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_Filesystems", x => x.Id); });
|
||||
migrationBuilder.CreateTable("Filesystems", table => new
|
||||
{
|
||||
Id = table.Column<int>().Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(nullable: true), Synchronized = table.Column<bool>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Filesystems", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("Filters",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Synchronized = table.Column<bool>(nullable: false)
|
||||
}, constraints: table => { table.PrimaryKey("PK_Filters", x => x.Id); });
|
||||
migrationBuilder.CreateTable("Filters", table => new
|
||||
{
|
||||
Id = table.Column<int>().Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(nullable: true), Synchronized = table.Column<bool>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Filters", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("MediaFormats",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Synchronized = table.Column<bool>(nullable: false)
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_MediaFormats", x => x.Id); });
|
||||
migrationBuilder.CreateTable("MediaFormats", table => new
|
||||
{
|
||||
Id = table.Column<int>().Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(nullable: true), Synchronized = table.Column<bool>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MediaFormats", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("Partitions",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Synchronized = table.Column<bool>(nullable: false)
|
||||
}, constraints: table => { table.PrimaryKey("PK_Partitions", x => x.Id); });
|
||||
migrationBuilder.CreateTable("Partitions", table => new
|
||||
{
|
||||
Id = table.Column<int>().Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(nullable: true), Synchronized = table.Column<bool>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Partitions", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
|
||||
@@ -4,22 +4,42 @@ namespace Aaru.Database.Migrations
|
||||
{
|
||||
public partial class MediaStatistics : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable("Medias",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Type = table.Column<string>(nullable: true),
|
||||
Real = table.Column<bool>(nullable: false),
|
||||
Synchronized = table.Column<bool>(nullable: false)
|
||||
}, constraints: table => { table.PrimaryKey("PK_Medias", x => x.Id); });
|
||||
}
|
||||
protected override void Up(MigrationBuilder migrationBuilder) => migrationBuilder.CreateTable("Medias", table =>
|
||||
new
|
||||
{
|
||||
Id =
|
||||
table.
|
||||
Column
|
||||
<int
|
||||
>().
|
||||
Annotation("Sqlite:Autoincrement",
|
||||
true),
|
||||
Type =
|
||||
table.
|
||||
Column
|
||||
<string
|
||||
>(nullable
|
||||
: true),
|
||||
Real =
|
||||
table.
|
||||
Column
|
||||
<bool
|
||||
>(),
|
||||
Synchronized
|
||||
= table.
|
||||
Column
|
||||
<bool
|
||||
>()
|
||||
}, constraints
|
||||
: table =>
|
||||
{
|
||||
table.
|
||||
PrimaryKey("PK_Medias",
|
||||
x =>
|
||||
x.
|
||||
Id);
|
||||
});
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable("Medias");
|
||||
}
|
||||
protected override void Down(MigrationBuilder migrationBuilder) => migrationBuilder.DropTable("Medias");
|
||||
}
|
||||
}
|
||||
@@ -4,25 +4,52 @@ namespace Aaru.Database.Migrations
|
||||
{
|
||||
public partial class SeenDevicesStatistics : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable("SeenDevices",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Manufacturer = table.Column<string>(nullable: true),
|
||||
Model = table.Column<string>(nullable: true),
|
||||
Revision = table.Column<string>(nullable: true),
|
||||
Bus = table.Column<string>(nullable: true),
|
||||
Synchronized = table.Column<bool>(nullable: false)
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_SeenDevices", x => x.Id); });
|
||||
}
|
||||
protected override void Up(MigrationBuilder migrationBuilder) => migrationBuilder.CreateTable("SeenDevices",
|
||||
table => new
|
||||
{
|
||||
Id = table.
|
||||
Column<
|
||||
int
|
||||
>().
|
||||
Annotation("Sqlite:Autoincrement",
|
||||
true),
|
||||
Manufacturer =
|
||||
table.
|
||||
Column
|
||||
<string
|
||||
>(nullable
|
||||
: true),
|
||||
Model = table.
|
||||
Column<
|
||||
string
|
||||
>(nullable
|
||||
: true),
|
||||
Revision =
|
||||
table.
|
||||
Column
|
||||
<string
|
||||
>(nullable
|
||||
: true),
|
||||
Bus = table.
|
||||
Column<
|
||||
string
|
||||
>(nullable
|
||||
: true),
|
||||
Synchronized =
|
||||
table.
|
||||
Column
|
||||
<bool
|
||||
>()
|
||||
}, constraints:
|
||||
table =>
|
||||
{
|
||||
table.
|
||||
PrimaryKey("PK_SeenDevices",
|
||||
x =>
|
||||
x.
|
||||
Id);
|
||||
});
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable("SeenDevices");
|
||||
}
|
||||
protected override void Down(MigrationBuilder migrationBuilder) => migrationBuilder.DropTable("SeenDevices");
|
||||
}
|
||||
}
|
||||
@@ -4,23 +4,18 @@ namespace Aaru.Database.Migrations
|
||||
{
|
||||
public partial class OperatingSystemStatistics : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable("OperatingSystems",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(nullable: true),
|
||||
Version = table.Column<string>(nullable: true),
|
||||
Synchronized = table.Column<bool>(nullable: false)
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_OperatingSystems", x => x.Id); });
|
||||
}
|
||||
protected override void Up(MigrationBuilder migrationBuilder) =>
|
||||
migrationBuilder.CreateTable("OperatingSystems", table => new
|
||||
{
|
||||
Id = table.Column<int>().Annotation("Sqlite:Autoincrement", true),
|
||||
Name = table.Column<string>(nullable: true), Version = table.Column<string>(nullable: true),
|
||||
Synchronized = table.Column<bool>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OperatingSystems", x => x.Id);
|
||||
});
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Down(MigrationBuilder migrationBuilder) =>
|
||||
migrationBuilder.DropTable("OperatingSystems");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,21 +4,35 @@ namespace Aaru.Database.Migrations
|
||||
{
|
||||
public partial class VersionStatistics : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable("Versions",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
Value = table.Column<string>(nullable: true),
|
||||
Synchronized = table.Column<bool>(nullable: false)
|
||||
}, constraints: table => { table.PrimaryKey("PK_Versions", x => x.Id); });
|
||||
}
|
||||
protected override void Up(MigrationBuilder migrationBuilder) => migrationBuilder.CreateTable("Versions",
|
||||
table => new
|
||||
{
|
||||
Id = table.
|
||||
Column<
|
||||
int
|
||||
>().
|
||||
Annotation("Sqlite:Autoincrement",
|
||||
true),
|
||||
Value = table.
|
||||
Column<
|
||||
string
|
||||
>(nullable
|
||||
: true),
|
||||
Synchronized =
|
||||
table.
|
||||
Column
|
||||
<bool
|
||||
>()
|
||||
}, constraints:
|
||||
table =>
|
||||
{
|
||||
table.
|
||||
PrimaryKey("PK_Versions",
|
||||
x =>
|
||||
x.
|
||||
Id);
|
||||
});
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable("Versions");
|
||||
}
|
||||
protected override void Down(MigrationBuilder migrationBuilder) => migrationBuilder.DropTable("Versions");
|
||||
}
|
||||
}
|
||||
@@ -15,66 +15,63 @@ namespace Aaru.Database.Migrations
|
||||
{
|
||||
migrationBuilder.DropColumn("ModeSense2AData", "Mmc");
|
||||
|
||||
migrationBuilder.CreateTable("ModePage_2A",
|
||||
table => new
|
||||
{
|
||||
Id =
|
||||
table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
AccurateCDDA = table.Column<bool>(nullable: false),
|
||||
AudioPlay = table.Column<bool>(nullable: false),
|
||||
BCK = table.Column<bool>(nullable: false),
|
||||
BUF = table.Column<bool>(nullable: false),
|
||||
BufferSize = table.Column<ushort>(nullable: false),
|
||||
C2Pointer = table.Column<bool>(nullable: false),
|
||||
CDDACommand = table.Column<bool>(nullable: false),
|
||||
CMRSupported = table.Column<ushort>(nullable: false),
|
||||
Composite = table.Column<bool>(nullable: false),
|
||||
CurrentSpeed = table.Column<ushort>(nullable: false),
|
||||
CurrentWriteSpeed = table.Column<ushort>(nullable: false),
|
||||
CurrentWriteSpeedSelected = table.Column<ushort>(nullable: false),
|
||||
DeinterlaveSubchannel = table.Column<bool>(nullable: false),
|
||||
DigitalPort1 = table.Column<bool>(nullable: false),
|
||||
DigitalPort2 = table.Column<bool>(nullable: false),
|
||||
Eject = table.Column<bool>(nullable: false),
|
||||
ISRC = table.Column<bool>(nullable: false),
|
||||
LSBF = table.Column<bool>(nullable: false),
|
||||
LeadInPW = table.Column<bool>(nullable: false),
|
||||
Length = table.Column<byte>(nullable: false),
|
||||
LoadingMechanism = table.Column<byte>(nullable: false),
|
||||
Lock = table.Column<bool>(nullable: false),
|
||||
LockState = table.Column<bool>(nullable: false),
|
||||
MaxWriteSpeed = table.Column<ushort>(nullable: false),
|
||||
MaximumSpeed = table.Column<ushort>(nullable: false),
|
||||
Method2 = table.Column<bool>(nullable: false),
|
||||
Mode2Form1 = table.Column<bool>(nullable: false),
|
||||
Mode2Form2 = table.Column<bool>(nullable: false),
|
||||
MultiSession = table.Column<bool>(nullable: false),
|
||||
PS = table.Column<bool>(nullable: false),
|
||||
PreventJumper = table.Column<bool>(nullable: false),
|
||||
RCK = table.Column<bool>(nullable: false),
|
||||
ReadBarcode = table.Column<bool>(nullable: false),
|
||||
ReadCDR = table.Column<bool>(nullable: false),
|
||||
ReadCDRW = table.Column<bool>(nullable: false),
|
||||
ReadDVDR = table.Column<bool>(nullable: false),
|
||||
ReadDVDRAM = table.Column<bool>(nullable: false),
|
||||
ReadDVDROM = table.Column<bool>(nullable: false),
|
||||
RotationControlSelected = table.Column<byte>(nullable: false),
|
||||
SCC = table.Column<bool>(nullable: false),
|
||||
SDP = table.Column<bool>(nullable: false),
|
||||
SSS = table.Column<bool>(nullable: false),
|
||||
SeparateChannelMute = table.Column<bool>(nullable: false),
|
||||
SeparateChannelVolume = table.Column<bool>(nullable: false),
|
||||
Subchannel = table.Column<bool>(nullable: false),
|
||||
SupportedVolumeLevels = table.Column<ushort>(nullable: false),
|
||||
TestWrite = table.Column<bool>(nullable: false),
|
||||
UPC = table.Column<bool>(nullable: false),
|
||||
WriteCDR = table.Column<bool>(nullable: false),
|
||||
WriteCDRW = table.Column<bool>(nullable: false),
|
||||
WriteDVDR = table.Column<bool>(nullable: false),
|
||||
WriteDVDRAM = table.Column<bool>(nullable: false)
|
||||
},
|
||||
constraints: table => { table.PrimaryKey("PK_ModePage_2A", x => x.Id); });
|
||||
migrationBuilder.CreateTable("ModePage_2A", table => new
|
||||
{
|
||||
Id = table.Column<int>().Annotation("Sqlite:Autoincrement", true),
|
||||
AccurateCDDA = table.Column<bool>(),
|
||||
AudioPlay = table.Column<bool>(),
|
||||
BCK = table.Column<bool>(), BUF = table.Column<bool>(),
|
||||
BufferSize = table.Column<ushort>(),
|
||||
C2Pointer = table.Column<bool>(),
|
||||
CDDACommand = table.Column<bool>(),
|
||||
CMRSupported = table.Column<ushort>(),
|
||||
Composite = table.Column<bool>(),
|
||||
CurrentSpeed = table.Column<ushort>(),
|
||||
CurrentWriteSpeed = table.Column<ushort>(),
|
||||
CurrentWriteSpeedSelected = table.Column<ushort>(),
|
||||
DeinterlaveSubchannel = table.Column<bool>(),
|
||||
DigitalPort1 = table.Column<bool>(),
|
||||
DigitalPort2 = table.Column<bool>(),
|
||||
Eject = table.Column<bool>(),
|
||||
ISRC = table.Column<bool>(),
|
||||
LSBF = table.Column<bool>(),
|
||||
LeadInPW = table.Column<bool>(),
|
||||
Length = table.Column<byte>(),
|
||||
LoadingMechanism = table.Column<byte>(),
|
||||
Lock = table.Column<bool>(),
|
||||
LockState = table.Column<bool>(),
|
||||
MaxWriteSpeed = table.Column<ushort>(),
|
||||
MaximumSpeed = table.Column<ushort>(),
|
||||
Method2 = table.Column<bool>(),
|
||||
Mode2Form1 = table.Column<bool>(),
|
||||
Mode2Form2 = table.Column<bool>(),
|
||||
MultiSession = table.Column<bool>(),
|
||||
PS = table.Column<bool>(),
|
||||
PreventJumper = table.Column<bool>(),
|
||||
RCK = table.Column<bool>(),
|
||||
ReadBarcode = table.Column<bool>(),
|
||||
ReadCDR = table.Column<bool>(),
|
||||
ReadCDRW = table.Column<bool>(),
|
||||
ReadDVDR = table.Column<bool>(),
|
||||
ReadDVDRAM = table.Column<bool>(),
|
||||
ReadDVDROM = table.Column<bool>(),
|
||||
RotationControlSelected = table.Column<byte>(),
|
||||
SCC = table.Column<bool>(),
|
||||
SDP = table.Column<bool>(), SSS = table.Column<bool>(),
|
||||
SeparateChannelMute = table.Column<bool>(),
|
||||
SeparateChannelVolume = table.Column<bool>(),
|
||||
Subchannel = table.Column<bool>(),
|
||||
SupportedVolumeLevels = table.Column<ushort>(),
|
||||
TestWrite = table.Column<bool>(),
|
||||
UPC = table.Column<bool>(),
|
||||
WriteCDR = table.Column<bool>(),
|
||||
WriteCDRW = table.Column<bool>(),
|
||||
WriteDVDR = table.Column<bool>(),
|
||||
WriteDVDRAM = table.Column<bool>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ModePage_2A", x => x.Id);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,31 +7,30 @@ namespace Aaru.Database.Migrations
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable("UsbVendors",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<ushort>(nullable: false),
|
||||
Vendor = table.Column<string>(nullable: true),
|
||||
AddedWhen = table.Column<DateTime>(nullable: false),
|
||||
ModifiedWhen = table.Column<DateTime>(nullable: false)
|
||||
}, constraints: table => { table.PrimaryKey("PK_UsbVendors", x => x.Id); });
|
||||
migrationBuilder.CreateTable("UsbVendors", table => new
|
||||
{
|
||||
Id = table.Column<ushort>(), Vendor = table.Column<string>(nullable: true),
|
||||
AddedWhen = table.Column<DateTime>(), ModifiedWhen = table.Column<DateTime>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_UsbVendors", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable("UsbProducts",
|
||||
table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
ProductId = table.Column<ushort>(nullable: false),
|
||||
Product = table.Column<string>(nullable: true),
|
||||
AddedWhen = table.Column<DateTime>(nullable: false),
|
||||
ModifiedWhen = table.Column<DateTime>(nullable: false),
|
||||
VendorId = table.Column<ushort>(nullable: false)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_UsbProducts", x => x.Id);
|
||||
table.ForeignKey("FK_UsbProducts_UsbVendors_VendorId", x => x.VendorId,
|
||||
"UsbVendors", "Id", onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
migrationBuilder.CreateTable("UsbProducts", table => new
|
||||
{
|
||||
Id = table.Column<int>().Annotation("Sqlite:Autoincrement", true),
|
||||
ProductId = table.Column<ushort>(),
|
||||
Product = table.Column<string>(nullable: true),
|
||||
AddedWhen = table.Column<DateTime>(),
|
||||
ModifiedWhen = table.Column<DateTime>(),
|
||||
VendorId = table.Column<ushort>()
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_UsbProducts", x => x.Id);
|
||||
|
||||
table.ForeignKey("FK_UsbProducts_UsbVendors_VendorId", x => x.VendorId, "UsbVendors", "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex("IX_UsbProducts_VendorId", "UsbProducts", "VendorId");
|
||||
}
|
||||
|
||||
@@ -6,16 +6,16 @@ namespace Aaru.Database.Migrations
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateIndex("IX_UsbProducts_ProductId", "UsbProducts", "ProductId");
|
||||
migrationBuilder.CreateIndex("IX_UsbProducts_ProductId", "UsbProducts", "ProductId");
|
||||
migrationBuilder.CreateIndex("IX_UsbProducts_ModifiedWhen", "UsbProducts", "ModifiedWhen");
|
||||
migrationBuilder.CreateIndex("IX_UsbVendors_ModifiedWhen", "UsbVendors", "ModifiedWhen");
|
||||
migrationBuilder.CreateIndex("IX_UsbVendors_ModifiedWhen", "UsbVendors", "ModifiedWhen");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropIndex("IX_UsbProducts_ProductId", "UsbProducts");
|
||||
migrationBuilder.DropIndex("IX_UsbProducts_ProductId", "UsbProducts");
|
||||
migrationBuilder.DropIndex("IX_UsbProducts_ModifiedWhen", "UsbProducts");
|
||||
migrationBuilder.DropIndex("IX_UsbVendors_ModifiedWhen", "UsbVendors");
|
||||
migrationBuilder.DropIndex("IX_UsbVendors_ModifiedWhen", "UsbVendors");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,26 +5,61 @@ namespace Aaru.Database.Migrations
|
||||
{
|
||||
public partial class AddCdOffsets : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable("CdOffsets",
|
||||
table => new
|
||||
{
|
||||
Manufacturer = table.Column<string>(nullable: true),
|
||||
Model = table.Column<string>(nullable: true),
|
||||
Offset = table.Column<short>(nullable: false),
|
||||
Submissions = table.Column<int>(nullable: false),
|
||||
Agreement = table.Column<float>(nullable: false),
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
AddedWhen = table.Column<DateTime>(nullable: false),
|
||||
ModifiedWhen = table.Column<DateTime>(nullable: false)
|
||||
}, constraints: table => { table.PrimaryKey("PK_CdOffsets", x => x.Id); });
|
||||
}
|
||||
protected override void Up(MigrationBuilder migrationBuilder) => migrationBuilder.CreateTable("CdOffsets",
|
||||
table => new
|
||||
{
|
||||
Manufacturer =
|
||||
table.
|
||||
Column
|
||||
<string
|
||||
>(nullable
|
||||
: true),
|
||||
Model = table.
|
||||
Column<
|
||||
string
|
||||
>(nullable
|
||||
: true),
|
||||
Offset =
|
||||
table.
|
||||
Column
|
||||
<short
|
||||
>(),
|
||||
Submissions =
|
||||
table.
|
||||
Column
|
||||
<int
|
||||
>(),
|
||||
Agreement =
|
||||
table.
|
||||
Column
|
||||
<float
|
||||
>(),
|
||||
Id = table.
|
||||
Column<
|
||||
int
|
||||
>().
|
||||
Annotation("Sqlite:Autoincrement",
|
||||
true),
|
||||
AddedWhen =
|
||||
table.
|
||||
Column
|
||||
<DateTime
|
||||
>(),
|
||||
ModifiedWhen =
|
||||
table.
|
||||
Column
|
||||
<DateTime
|
||||
>()
|
||||
}, constraints:
|
||||
table =>
|
||||
{
|
||||
table.
|
||||
PrimaryKey("PK_CdOffsets",
|
||||
x =>
|
||||
x.
|
||||
Id);
|
||||
});
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable("CdOffsets");
|
||||
}
|
||||
protected override void Down(MigrationBuilder migrationBuilder) => migrationBuilder.DropTable("CdOffsets");
|
||||
}
|
||||
}
|
||||
@@ -4,14 +4,10 @@ namespace Aaru.Database.Migrations
|
||||
{
|
||||
public partial class AddOptimalReadMultipleCount : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder) =>
|
||||
migrationBuilder.AddColumn<int>("OptimalMultipleSectorsRead", "Devices", nullable: false, defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
protected override void Down(MigrationBuilder migrationBuilder) =>
|
||||
migrationBuilder.DropColumn("OptimalMultipleSectorsRead", "Devices");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,23 +8,21 @@ namespace Aaru.Database.Migrations
|
||||
{
|
||||
migrationBuilder.RenameTable("DensityCode", newName: "DensityCode_old");
|
||||
|
||||
migrationBuilder.CreateTable("DensityCode",
|
||||
table => new
|
||||
{
|
||||
Code = table.Column<int>(nullable: false, defaultValue: 0),
|
||||
SscSupportedMediaId = table.Column<int>(nullable: true),
|
||||
Id = table.Column<int>()
|
||||
.Annotation("Sqlite:Autoincrement", true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DensityCode", x => x.Id);
|
||||
table.ForeignKey("FK_DensityCode_SscSupportedMedia_SscSupportedMediaId",
|
||||
x => x.SscSupportedMediaId, "SscSupportedMedia", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.CreateTable("DensityCode", table => new
|
||||
{
|
||||
Code = table.Column<int>(nullable: false, defaultValue: 0),
|
||||
SscSupportedMediaId = table.Column<int>(nullable: true),
|
||||
Id = table.Column<int>().Annotation("Sqlite:Autoincrement", true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DensityCode", x => x.Id);
|
||||
|
||||
migrationBuilder
|
||||
.Sql("INSERT INTO DensityCode (Code, SscSupportedMediaId) SELECT Code, SscSupportedMediaId FROM DensityCode_old");
|
||||
table.ForeignKey("FK_DensityCode_SscSupportedMedia_SscSupportedMediaId", x => x.SscSupportedMediaId,
|
||||
"SscSupportedMedia", "Id", onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.
|
||||
Sql("INSERT INTO DensityCode (Code, SscSupportedMediaId) SELECT Code, SscSupportedMediaId FROM DensityCode_old");
|
||||
|
||||
migrationBuilder.DropTable("DensityCode_old");
|
||||
}
|
||||
@@ -33,22 +31,20 @@ namespace Aaru.Database.Migrations
|
||||
{
|
||||
migrationBuilder.RenameTable("DensityCode", newName: "DensityCode_old");
|
||||
|
||||
migrationBuilder.CreateTable("DensityCode",
|
||||
table => new
|
||||
{
|
||||
Code = table.Column<int>()
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
SscSupportedMediaId = table.Column<int>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DensityCode", x => x.Code);
|
||||
table.ForeignKey("FK_DensityCode_SscSupportedMedia_SscSupportedMediaId",
|
||||
x => x.SscSupportedMediaId, "SscSupportedMedia", "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.CreateTable("DensityCode", table => new
|
||||
{
|
||||
Code = table.Column<int>().Annotation("Sqlite:Autoincrement", true),
|
||||
SscSupportedMediaId = table.Column<int>(nullable: true)
|
||||
}, constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DensityCode", x => x.Code);
|
||||
|
||||
migrationBuilder
|
||||
.Sql("INSERT INTO DensityCode (Code, SscSupportedMediaId) SELECT Code, SscSupportedMediaId FROM DensityCode_old");
|
||||
table.ForeignKey("FK_DensityCode_SscSupportedMedia_SscSupportedMediaId", x => x.SscSupportedMediaId,
|
||||
"SscSupportedMedia", "Id", onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.
|
||||
Sql("INSERT INTO DensityCode (Code, SscSupportedMediaId) SELECT Code, SscSupportedMediaId FROM DensityCode_old");
|
||||
|
||||
migrationBuilder.DropTable("DensityCode_old");
|
||||
}
|
||||
|
||||
@@ -4,20 +4,10 @@ namespace Aaru.Database.Migrations
|
||||
{
|
||||
public partial class AddNameCountModel : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Value",
|
||||
table: "Versions",
|
||||
newName: "Name");
|
||||
}
|
||||
protected override void Up(MigrationBuilder migrationBuilder) =>
|
||||
migrationBuilder.RenameColumn("Value", "Versions", "Name");
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Name",
|
||||
table: "Versions",
|
||||
newName: "Value");
|
||||
}
|
||||
protected override void Down(MigrationBuilder migrationBuilder) =>
|
||||
migrationBuilder.RenameColumn("Name", "Versions", "Value");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1337,8 +1337,7 @@ namespace Aaru.Database.Migrations
|
||||
|
||||
modelBuilder.Entity("Aaru.CommonTypes.Metadata.BlockDescriptor", b =>
|
||||
{
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.ScsiMode").WithMany("BlockDescriptors").
|
||||
HasForeignKey("ScsiModeId");
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.ScsiMode").WithMany("BlockDescriptors").HasForeignKey("ScsiModeId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Aaru.CommonTypes.Metadata.DensityCode", b =>
|
||||
@@ -1349,14 +1348,12 @@ namespace Aaru.Database.Migrations
|
||||
|
||||
modelBuilder.Entity("Aaru.CommonTypes.Metadata.Mmc", b =>
|
||||
{
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.MmcFeatures", "Features").WithMany().
|
||||
HasForeignKey("FeaturesId");
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.MmcFeatures", "Features").WithMany().HasForeignKey("FeaturesId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Aaru.CommonTypes.Metadata.Scsi", b =>
|
||||
{
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.ScsiMode", "ModeSense").WithMany().
|
||||
HasForeignKey("ModeSenseId");
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.ScsiMode", "ModeSense").WithMany().HasForeignKey("ModeSenseId");
|
||||
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.Mmc", "MultiMediaDevice").WithMany().
|
||||
HasForeignKey("MultiMediaDeviceId");
|
||||
@@ -1372,14 +1369,12 @@ namespace Aaru.Database.Migrations
|
||||
{
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.Scsi").WithMany("EVPDPages").HasForeignKey("ScsiId");
|
||||
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.ScsiMode").WithMany("ModePages").
|
||||
HasForeignKey("ScsiModeId");
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.ScsiMode").WithMany("ModePages").HasForeignKey("ScsiModeId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Aaru.CommonTypes.Metadata.SscSupportedMedia", b =>
|
||||
{
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.Ssc").WithMany("SupportedMediaTypes").
|
||||
HasForeignKey("SscId");
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.Ssc").WithMany("SupportedMediaTypes").HasForeignKey("SscId");
|
||||
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.TestedSequentialMedia").WithMany("SupportedMediaTypes").
|
||||
HasForeignKey("TestedSequentialMediaId");
|
||||
@@ -1387,8 +1382,7 @@ namespace Aaru.Database.Migrations
|
||||
|
||||
modelBuilder.Entity("Aaru.CommonTypes.Metadata.SupportedDensity", b =>
|
||||
{
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.Ssc").WithMany("SupportedDensities").
|
||||
HasForeignKey("SscId");
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.Ssc").WithMany("SupportedDensities").HasForeignKey("SscId");
|
||||
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.TestedSequentialMedia").WithMany("SupportedDensities").
|
||||
HasForeignKey("TestedSequentialMediaId");
|
||||
@@ -1400,8 +1394,7 @@ namespace Aaru.Database.Migrations
|
||||
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.Chs", "CHS").WithMany().HasForeignKey("CHSId");
|
||||
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.Chs", "CurrentCHS").WithMany().
|
||||
HasForeignKey("CurrentCHSId");
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.Chs", "CurrentCHS").WithMany().HasForeignKey("CurrentCHSId");
|
||||
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.Mmc").WithMany("TestedMedia").HasForeignKey("MmcId");
|
||||
|
||||
@@ -1419,8 +1412,7 @@ namespace Aaru.Database.Migrations
|
||||
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.Ata", "ATAPI").WithMany().HasForeignKey("ATAPIId");
|
||||
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.FireWire", "FireWire").WithMany().
|
||||
HasForeignKey("FireWireId");
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.FireWire", "FireWire").WithMany().HasForeignKey("FireWireId");
|
||||
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.MmcSd", "MultiMediaCard").WithMany().
|
||||
HasForeignKey("MultiMediaCardId");
|
||||
@@ -1441,8 +1433,7 @@ namespace Aaru.Database.Migrations
|
||||
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.Ata", "ATAPI").WithMany().HasForeignKey("ATAPIId");
|
||||
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.FireWire", "FireWire").WithMany().
|
||||
HasForeignKey("FireWireId");
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.FireWire", "FireWire").WithMany().HasForeignKey("FireWireId");
|
||||
|
||||
b.HasOne("Aaru.CommonTypes.Metadata.MmcSd", "MultiMediaCard").WithMany().
|
||||
HasForeignKey("MultiMediaCardId");
|
||||
@@ -1459,8 +1450,8 @@ namespace Aaru.Database.Migrations
|
||||
|
||||
modelBuilder.Entity("Aaru.Database.Models.UsbProduct", b =>
|
||||
{
|
||||
b.HasOne("Aaru.Database.Models.UsbVendor", "Vendor").WithMany("Products").
|
||||
HasForeignKey("VendorId").OnDelete(DeleteBehavior.Cascade);
|
||||
b.HasOne("Aaru.Database.Models.UsbVendor", "Vendor").WithMany("Products").HasForeignKey("VendorId").
|
||||
OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Aaru.Database.Models
|
||||
{
|
||||
public class CdOffset : CommonTypes.Metadata.CdOffset
|
||||
{
|
||||
public CdOffset() { }
|
||||
public CdOffset() {}
|
||||
|
||||
public CdOffset(string manufacturer, string model, short offset, int submissions, float agreement)
|
||||
{
|
||||
|
||||
@@ -32,5 +32,5 @@
|
||||
|
||||
namespace Aaru.Database.Models
|
||||
{
|
||||
public class Command : NameCountModel<int> { }
|
||||
public class Command : NameCountModel<int> {}
|
||||
}
|
||||
@@ -38,10 +38,7 @@ namespace Aaru.Database.Models
|
||||
{
|
||||
public class Device : DeviceReportV2
|
||||
{
|
||||
public Device()
|
||||
{
|
||||
LastSynchronized = DateTime.UtcNow;
|
||||
}
|
||||
public Device() => LastSynchronized = DateTime.UtcNow;
|
||||
|
||||
public Device(DeviceReportV2 report)
|
||||
{
|
||||
|
||||
@@ -32,5 +32,5 @@
|
||||
|
||||
namespace Aaru.Database.Models
|
||||
{
|
||||
public class Filesystem : NameCountModel<int> { }
|
||||
public class Filesystem : NameCountModel<int> {}
|
||||
}
|
||||
@@ -32,5 +32,5 @@
|
||||
|
||||
namespace Aaru.Database.Models
|
||||
{
|
||||
public class Filter : NameCountModel<int> { }
|
||||
public class Filter : NameCountModel<int> {}
|
||||
}
|
||||
@@ -32,5 +32,5 @@
|
||||
|
||||
namespace Aaru.Database.Models
|
||||
{
|
||||
public class MediaFormat : NameCountModel<int> { }
|
||||
public class MediaFormat : NameCountModel<int> {}
|
||||
}
|
||||
@@ -32,5 +32,5 @@
|
||||
|
||||
namespace Aaru.Database.Models
|
||||
{
|
||||
public class OperatingSystem : BaseOperatingSystem { }
|
||||
public class OperatingSystem : BaseOperatingSystem {}
|
||||
}
|
||||
@@ -32,5 +32,5 @@
|
||||
|
||||
namespace Aaru.Database.Models
|
||||
{
|
||||
public class Partition : NameCountModel<int> { }
|
||||
public class Partition : NameCountModel<int> {}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Aaru.Database.Models
|
||||
{
|
||||
public class RemoteApplication : BaseOperatingSystem { }
|
||||
public class RemoteApplication : BaseOperatingSystem {}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Aaru.Database.Models
|
||||
{
|
||||
public class RemoteArchitecture : NameCountModel<int> { }
|
||||
public class RemoteArchitecture : NameCountModel<int> {}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Aaru.Database.Models
|
||||
{
|
||||
public class RemoteOperatingSystem : BaseOperatingSystem { }
|
||||
public class RemoteOperatingSystem : BaseOperatingSystem {}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ namespace Aaru.Database.Models
|
||||
{
|
||||
public class UsbProduct
|
||||
{
|
||||
public UsbProduct() { }
|
||||
public UsbProduct() {}
|
||||
|
||||
public UsbProduct(ushort vendorId, ushort id, string product)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Aaru.Database.Models
|
||||
{
|
||||
public class UsbVendor
|
||||
{
|
||||
public UsbVendor() { }
|
||||
public UsbVendor() {}
|
||||
|
||||
public UsbVendor(ushort id, string vendor)
|
||||
{
|
||||
|
||||
@@ -32,5 +32,5 @@
|
||||
|
||||
namespace Aaru.Database.Models
|
||||
{
|
||||
public class Version : NameCountModel<int> { }
|
||||
public class Version : NameCountModel<int> {}
|
||||
}
|
||||
Reference in New Issue
Block a user