mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Workaround unsigned fields in database unsupported by EntityFramework 6.
This commit is contained in:
5
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
5
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
@@ -315,6 +315,8 @@
|
||||
<e p="20181221041242_VersionStatistics.cs" t="Include" />
|
||||
<e p="20181221125353_AddStatsCounters.Designer.cs" t="Include" />
|
||||
<e p="20181221125353_AddStatsCounters.cs" t="Include" />
|
||||
<e p="20181223183913_FixUnsignedFields.Designer.cs" t="Include" />
|
||||
<e p="20181223183913_FixUnsignedFields.cs" t="Include" />
|
||||
<e p="DicContextModelSnapshot.cs" t="Include" />
|
||||
</e>
|
||||
<e p="Models" t="Include">
|
||||
@@ -1798,6 +1800,9 @@
|
||||
<e p="201812221606592_LinkDeviceStatsToReport.Designer.cs" t="Include" />
|
||||
<e p="201812221606592_LinkDeviceStatsToReport.cs" t="Include" />
|
||||
<e p="201812221606592_LinkDeviceStatsToReport.resx" t="Include" />
|
||||
<e p="201812231612080_FixUnsignedFields.Designer.cs" t="Include" />
|
||||
<e p="201812231612080_FixUnsignedFields.cs" t="Include" />
|
||||
<e p="201812231612080_FixUnsignedFields.resx" t="Include" />
|
||||
<e p="Configuration.cs" t="Include" />
|
||||
</e>
|
||||
<e p="Models" t="Include">
|
||||
|
||||
@@ -996,6 +996,38 @@ namespace DiscImageChef.CommonTypes.Metadata
|
||||
public string Organization { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[XmlIgnore]
|
||||
public int BitsPerMmSql
|
||||
{
|
||||
get => (int)BitsPerMm;
|
||||
set => BitsPerMm = (uint)value;
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
[XmlIgnore]
|
||||
public short WidthSql
|
||||
{
|
||||
get => (short)Width;
|
||||
set => Width = (ushort)value;
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
[XmlIgnore]
|
||||
public short TracksSql
|
||||
{
|
||||
get => (short)Tracks;
|
||||
set => Tracks = (ushort)value;
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
[XmlIgnore]
|
||||
public int CapacitySql
|
||||
{
|
||||
get => (int)Capacity;
|
||||
set => Capacity = (uint)value;
|
||||
}
|
||||
}
|
||||
|
||||
public class SupportedMedia
|
||||
|
||||
@@ -45,6 +45,7 @@ using DiscImageChef.Decoders.ATA;
|
||||
using DiscImageChef.Decoders.SCSI;
|
||||
using DiscImageChef.Decoders.SCSI.MMC;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
// ReSharper disable VirtualMemberNeverOverridden.Global
|
||||
// ReSharper disable VirtualMemberCallInConstructor
|
||||
|
||||
@@ -156,6 +157,20 @@ namespace DiscImageChef.CommonTypes.Metadata
|
||||
public string Product { get; set; }
|
||||
public bool RemovableMedia { get; set; }
|
||||
public byte[] Descriptors { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public short VendorIDSql
|
||||
{
|
||||
get => (short)VendorID;
|
||||
set => VendorID = (ushort)value;
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public short ProductIDSql
|
||||
{
|
||||
get => (short)ProductID;
|
||||
set => ProductID = (ushort)value;
|
||||
}
|
||||
}
|
||||
|
||||
public class FireWire
|
||||
@@ -178,6 +193,20 @@ namespace DiscImageChef.CommonTypes.Metadata
|
||||
public string Manufacturer { get; set; }
|
||||
public string Product { get; set; }
|
||||
public bool RemovableMedia { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public int VendorIDSql
|
||||
{
|
||||
get => (int)VendorID;
|
||||
set => VendorID = (uint)value;
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public int ProductIDSql
|
||||
{
|
||||
get => (int)ProductID;
|
||||
set => ProductID = (uint)value;
|
||||
}
|
||||
}
|
||||
|
||||
public class Ata
|
||||
@@ -395,6 +424,25 @@ namespace DiscImageChef.CommonTypes.Metadata
|
||||
public ushort Cylinders { get; set; }
|
||||
public ushort Heads { get; set; }
|
||||
public ushort Sectors { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public short CylindersSql
|
||||
{
|
||||
get => (short)Cylinders;
|
||||
set => Cylinders = (ushort)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public short HeadsSql
|
||||
{
|
||||
get => (short)Heads;
|
||||
set => Heads = (ushort)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public short SectorsSql
|
||||
{
|
||||
get => (short)Sectors;
|
||||
set => Sectors = (ushort)value;
|
||||
}
|
||||
}
|
||||
|
||||
public class Scsi
|
||||
@@ -578,6 +626,19 @@ namespace DiscImageChef.CommonTypes.Metadata
|
||||
public byte Density { get; set; }
|
||||
public ulong? Blocks { get; set; }
|
||||
public uint? BlockLength { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public long? BlocksSql
|
||||
{
|
||||
get => (long?)Blocks;
|
||||
set => Blocks = (ulong?)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public int? BlockLengthSql
|
||||
{
|
||||
get => (int?)BlockLength;
|
||||
set => BlockLength = (uint?)value;
|
||||
}
|
||||
}
|
||||
|
||||
public class ScsiPage
|
||||
@@ -686,8 +747,8 @@ namespace DiscImageChef.CommonTypes.Metadata
|
||||
|
||||
public MmcFeatures(mmcFeaturesType features)
|
||||
{
|
||||
if(features.PhysicalInterfaceStandardSpecified)
|
||||
PhysicalInterfaceStandard = features.PhysicalInterfaceStandard;
|
||||
if(features.PhysicalInterfaceStandardSpecified && !features.PhysicalInterfaceStandardNumberSpecified)
|
||||
PhysicalInterfaceStandardNumber = (uint?)features.PhysicalInterfaceStandard;
|
||||
|
||||
if(features.PhysicalInterfaceStandardNumberSpecified)
|
||||
PhysicalInterfaceStandardNumber = features.PhysicalInterfaceStandardNumber;
|
||||
@@ -926,12 +987,13 @@ namespace DiscImageChef.CommonTypes.Metadata
|
||||
public bool DVDMultiRead { get; set; }
|
||||
public bool EmbeddedChanger { get; set; }
|
||||
public bool ErrorRecoveryPage { get; set; }
|
||||
public virtual DateTime? FirmwareDate { get; set; }
|
||||
public DateTime? FirmwareDate { get; set; }
|
||||
public byte? LoadingMechanismType { get; set; }
|
||||
public bool Locked { get; set; }
|
||||
public uint? LogicalBlockSize { get; set; }
|
||||
public bool MultiRead { get; set; }
|
||||
public virtual PhysicalInterfaces? PhysicalInterfaceStandard { get; set; }
|
||||
public PhysicalInterfaces? PhysicalInterfaceStandard =>
|
||||
(PhysicalInterfaces?)PhysicalInterfaceStandardNumber;
|
||||
public uint? PhysicalInterfaceStandardNumber { get; set; }
|
||||
public bool PreventJumper { get; set; }
|
||||
public bool SupportsAACS { get; set; }
|
||||
@@ -952,6 +1014,30 @@ namespace DiscImageChef.CommonTypes.Metadata
|
||||
public bool SupportsWriteInhibitDCB { get; set; }
|
||||
public bool SupportsWriteProtectPAC { get; set; }
|
||||
public ushort? VolumeLevels { get; set; }
|
||||
[JsonIgnore]
|
||||
public short? BlocksPerReadableUnitSql
|
||||
{
|
||||
get => (short?)BlocksPerReadableUnit;
|
||||
set => BlocksPerReadableUnit = (ushort?)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public int? LogicalBlockSizeSql
|
||||
{
|
||||
get => (int?)LogicalBlockSize;
|
||||
set => LogicalBlockSize = (uint?)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public int? PhysicalInterfaceStandardNumberSql
|
||||
{
|
||||
get => (int?)PhysicalInterfaceStandardNumber;
|
||||
set => PhysicalInterfaceStandardNumber = (uint?)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public short? VolumeLevelsSql
|
||||
{
|
||||
get => (short?)VolumeLevels;
|
||||
set => VolumeLevels = (ushort?)value;
|
||||
}
|
||||
}
|
||||
|
||||
public class TestedMedia
|
||||
@@ -1231,6 +1317,67 @@ namespace DiscImageChef.CommonTypes.Metadata
|
||||
public bool? SupportsReadSectors { get; set; }
|
||||
public bool? SupportsReadLongRetry { get; set; }
|
||||
public bool? SupportsSeek { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public long? BlocksSql
|
||||
{
|
||||
get => (long?)Blocks;
|
||||
set => Blocks = (ulong?)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public int? BlockSizeSql
|
||||
{
|
||||
get => (int?)BlockSize;
|
||||
set => BlockSize = (uint?)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public int? LongBlockSizeSql
|
||||
{
|
||||
get => (int?)LongBlockSize;
|
||||
set => LongBlockSize = (uint?)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public int? LBASectorsSql
|
||||
{
|
||||
get => (int?)LBASectors;
|
||||
set => LBASectors = (uint?)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public long? LBA48SectorsSql
|
||||
{
|
||||
get => (long?)LBA48Sectors;
|
||||
set => LBA48Sectors = (ulong?)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public short? LogicalAlignmentSql
|
||||
{
|
||||
get => (short?)LogicalAlignment;
|
||||
set => LogicalAlignment = (ushort?)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public short? NominalRotationRateSql
|
||||
{
|
||||
get => (short?)NominalRotationRate;
|
||||
set => NominalRotationRate = (ushort?)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public int? PhysicalBlockSizeSql
|
||||
{
|
||||
get => (int?)PhysicalBlockSize;
|
||||
set => PhysicalBlockSize = (uint?)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public short? UnformattedBPTSql
|
||||
{
|
||||
get => (short?)UnformattedBPT;
|
||||
set => UnformattedBPT = (ushort?)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public short? UnformattedBPSSql
|
||||
{
|
||||
get => (short?)UnformattedBPS;
|
||||
set => UnformattedBPS = (ushort?)value;
|
||||
}
|
||||
}
|
||||
|
||||
public class Ssc
|
||||
@@ -1268,6 +1415,18 @@ namespace DiscImageChef.CommonTypes.Metadata
|
||||
public virtual List<SupportedDensity> SupportedDensities { get; set; }
|
||||
public virtual List<SscSupportedMedia> SupportedMediaTypes { get; set; }
|
||||
public virtual List<TestedSequentialMedia> TestedMedia { get; set; }
|
||||
[JsonIgnore]
|
||||
public int? MaxBlockLengthSql
|
||||
{
|
||||
get => (int?)MaxBlockLength;
|
||||
set => MaxBlockLength = (uint?)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public int? MinBlockLengthSql
|
||||
{
|
||||
get => (int?)MinBlockLength;
|
||||
set => MinBlockLength = (uint?)value;
|
||||
}
|
||||
}
|
||||
|
||||
public class TestedSequentialMedia
|
||||
@@ -1338,6 +1497,18 @@ namespace DiscImageChef.CommonTypes.Metadata
|
||||
public ushort? CardCode { get; set; }
|
||||
public string Manufacturer { get; set; }
|
||||
public string ProductName { get; set; }
|
||||
[JsonIgnore]
|
||||
public short? ManufacturerCodeSql
|
||||
{
|
||||
get => (short?)ManufacturerCode;
|
||||
set => ManufacturerCode = (ushort?)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public short? CardCodeSql
|
||||
{
|
||||
get => (short?)CardCode;
|
||||
set => CardCode = (ushort?)value;
|
||||
}
|
||||
}
|
||||
|
||||
public class MmcSd
|
||||
@@ -1389,6 +1560,18 @@ namespace DiscImageChef.CommonTypes.Metadata
|
||||
public string Organization { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
[JsonIgnore]
|
||||
public short WidthSql
|
||||
{
|
||||
get => (short)Width;
|
||||
set => Width = (ushort)value;
|
||||
}
|
||||
[JsonIgnore]
|
||||
public short LengthSql
|
||||
{
|
||||
get => (short)Length;
|
||||
set => Length = (ushort)value;
|
||||
}
|
||||
}
|
||||
|
||||
public class DensityCode
|
||||
|
||||
@@ -60,13 +60,8 @@ namespace DiscImageChef.Core.Devices.Report
|
||||
{
|
||||
Feature_0001? ftr0001 = Features.Decode_0001(desc.Data);
|
||||
if(ftr0001.HasValue)
|
||||
{
|
||||
report.PhysicalInterfaceStandard = ftr0001.Value.PhysicalInterfaceStandard;
|
||||
if((uint)ftr0001.Value.PhysicalInterfaceStandard > 0x8)
|
||||
{
|
||||
report.PhysicalInterfaceStandardNumber = (uint)ftr0001.Value.PhysicalInterfaceStandard;
|
||||
report.PhysicalInterfaceStandard = PhysicalInterfaces.Unspecified;
|
||||
}
|
||||
|
||||
report.SupportsDeviceBusyEvent = ftr0001.Value.DBE;
|
||||
}
|
||||
|
||||
@@ -76,6 +76,8 @@
|
||||
<Compile Include="Migrations\20181221041242_VersionStatistics.Designer.cs" />
|
||||
<Compile Include="Migrations\20181221125353_AddStatsCounters.cs" />
|
||||
<Compile Include="Migrations\20181221125353_AddStatsCounters.Designer.cs" />
|
||||
<Compile Include="Migrations\20181223183913_FixUnsignedFields.cs" />
|
||||
<Compile Include="Migrations\20181223183913_FixUnsignedFields.Designer.cs" />
|
||||
<Compile Include="Migrations\DicContextModelSnapshot.cs" />
|
||||
<Compile Include="Models\Command.cs" />
|
||||
<Compile Include="Models\Device.cs" />
|
||||
|
||||
@@ -382,8 +382,6 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<bool>("MultiRead");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandard");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandardNumber");
|
||||
|
||||
b.Property<bool>("PreventJumper");
|
||||
|
||||
@@ -138,7 +138,6 @@ namespace DiscImageChef.Database.Migrations
|
||||
Locked = table.Column<bool>(nullable: false),
|
||||
LogicalBlockSize = table.Column<uint>(nullable: true),
|
||||
MultiRead = table.Column<bool>(nullable: false),
|
||||
PhysicalInterfaceStandard = table.Column<uint>(nullable: true),
|
||||
PhysicalInterfaceStandardNumber = table.Column<uint>(nullable: true),
|
||||
PreventJumper = table.Column<bool>(nullable: false),
|
||||
SupportsAACS = table.Column<bool>(nullable: false),
|
||||
|
||||
@@ -390,8 +390,6 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<bool>("MultiRead");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandard");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandardNumber");
|
||||
|
||||
b.Property<bool>("PreventJumper");
|
||||
|
||||
@@ -333,8 +333,6 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<bool>("MultiRead");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandard");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandardNumber");
|
||||
|
||||
b.Property<bool>("PreventJumper");
|
||||
|
||||
@@ -333,8 +333,6 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<bool>("MultiRead");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandard");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandardNumber");
|
||||
|
||||
b.Property<bool>("PreventJumper");
|
||||
|
||||
@@ -333,8 +333,6 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<bool>("MultiRead");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandard");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandardNumber");
|
||||
|
||||
b.Property<bool>("PreventJumper");
|
||||
|
||||
@@ -333,8 +333,6 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<bool>("MultiRead");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandard");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandardNumber");
|
||||
|
||||
b.Property<bool>("PreventJumper");
|
||||
|
||||
@@ -333,8 +333,6 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<bool>("MultiRead");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandard");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandardNumber");
|
||||
|
||||
b.Property<bool>("PreventJumper");
|
||||
|
||||
@@ -333,8 +333,6 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<bool>("MultiRead");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandard");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandardNumber");
|
||||
|
||||
b.Property<bool>("PreventJumper");
|
||||
|
||||
@@ -333,8 +333,6 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<bool>("MultiRead");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandard");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandardNumber");
|
||||
|
||||
b.Property<bool>("PreventJumper");
|
||||
|
||||
1475
DiscImageChef.Database/Migrations/20181223183913_FixUnsignedFields.Designer.cs
generated
Normal file
1475
DiscImageChef.Database/Migrations/20181223183913_FixUnsignedFields.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,146 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace DiscImageChef.Database.Migrations
|
||||
{
|
||||
public partial class FixUnsignedFields : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<short>("ProductIDSql", "Usb", nullable: false, defaultValue: (short)0);
|
||||
|
||||
migrationBuilder.AddColumn<short>("VendorIDSql", "Usb", nullable: false, defaultValue: (short)0);
|
||||
|
||||
migrationBuilder.AddColumn<int>("BlockSizeSql", "TestedMedia", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<long>("BlocksSql", "TestedMedia", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<long>("LBA48SectorsSql", "TestedMedia", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>("LBASectorsSql", "TestedMedia", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<short>("LogicalAlignmentSql", "TestedMedia", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>("LongBlockSizeSql", "TestedMedia", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<short>("NominalRotationRateSql", "TestedMedia", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>("PhysicalBlockSizeSql", "TestedMedia", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<short>("UnformattedBPSSql", "TestedMedia", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<short>("UnformattedBPTSql", "TestedMedia", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>("BitsPerMmSql", "SupportedDensity", nullable: false, defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>("CapacitySql", "SupportedDensity", nullable: false, defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<short>("TracksSql", "SupportedDensity", nullable: false, defaultValue: (short)0);
|
||||
|
||||
migrationBuilder.AddColumn<short>("WidthSql", "SupportedDensity", nullable: false, defaultValue: (short)0);
|
||||
|
||||
migrationBuilder.AddColumn<short>("LengthSql", "SscSupportedMedia", nullable: false,
|
||||
defaultValue: (short)0);
|
||||
|
||||
migrationBuilder.AddColumn<short>("WidthSql", "SscSupportedMedia", nullable: false, defaultValue: (short)0);
|
||||
|
||||
migrationBuilder.AddColumn<int>("MaxBlockLengthSql", "Ssc", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>("MinBlockLengthSql", "Ssc", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<short>("CardCodeSql", "Pcmcia", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<short>("ManufacturerCodeSql", "Pcmcia", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<short>("BlocksPerReadableUnitSql", "MmcFeatures", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>("LogicalBlockSizeSql", "MmcFeatures", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>("PhysicalInterfaceStandardNumberSql", "MmcFeatures", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<short>("VolumeLevelsSql", "MmcFeatures", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>("ProductIDSql", "FireWire", nullable: false, defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>("VendorIDSql", "FireWire", nullable: false, defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<short>("CylindersSql", "Chs", nullable: false, defaultValue: (short)0);
|
||||
|
||||
migrationBuilder.AddColumn<short>("HeadsSql", "Chs", nullable: false, defaultValue: (short)0);
|
||||
|
||||
migrationBuilder.AddColumn<short>("SectorsSql", "Chs", nullable: false, defaultValue: (short)0);
|
||||
|
||||
migrationBuilder.AddColumn<int>("BlockLengthSql", "BlockDescriptor", nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<long>("BlocksSql", "BlockDescriptor", nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn("ProductIDSql", "Usb");
|
||||
|
||||
migrationBuilder.DropColumn("VendorIDSql", "Usb");
|
||||
|
||||
migrationBuilder.DropColumn("BlockSizeSql", "TestedMedia");
|
||||
|
||||
migrationBuilder.DropColumn("BlocksSql", "TestedMedia");
|
||||
|
||||
migrationBuilder.DropColumn("LBA48SectorsSql", "TestedMedia");
|
||||
|
||||
migrationBuilder.DropColumn("LBASectorsSql", "TestedMedia");
|
||||
|
||||
migrationBuilder.DropColumn("LogicalAlignmentSql", "TestedMedia");
|
||||
|
||||
migrationBuilder.DropColumn("LongBlockSizeSql", "TestedMedia");
|
||||
|
||||
migrationBuilder.DropColumn("NominalRotationRateSql", "TestedMedia");
|
||||
|
||||
migrationBuilder.DropColumn("PhysicalBlockSizeSql", "TestedMedia");
|
||||
|
||||
migrationBuilder.DropColumn("UnformattedBPSSql", "TestedMedia");
|
||||
|
||||
migrationBuilder.DropColumn("UnformattedBPTSql", "TestedMedia");
|
||||
|
||||
migrationBuilder.DropColumn("BitsPerMmSql", "SupportedDensity");
|
||||
|
||||
migrationBuilder.DropColumn("CapacitySql", "SupportedDensity");
|
||||
|
||||
migrationBuilder.DropColumn("TracksSql", "SupportedDensity");
|
||||
|
||||
migrationBuilder.DropColumn("WidthSql", "SupportedDensity");
|
||||
|
||||
migrationBuilder.DropColumn("LengthSql", "SscSupportedMedia");
|
||||
|
||||
migrationBuilder.DropColumn("WidthSql", "SscSupportedMedia");
|
||||
|
||||
migrationBuilder.DropColumn("MaxBlockLengthSql", "Ssc");
|
||||
|
||||
migrationBuilder.DropColumn("MinBlockLengthSql", "Ssc");
|
||||
|
||||
migrationBuilder.DropColumn("CardCodeSql", "Pcmcia");
|
||||
|
||||
migrationBuilder.DropColumn("ManufacturerCodeSql", "Pcmcia");
|
||||
|
||||
migrationBuilder.DropColumn("BlocksPerReadableUnitSql", "MmcFeatures");
|
||||
|
||||
migrationBuilder.DropColumn("LogicalBlockSizeSql", "MmcFeatures");
|
||||
|
||||
migrationBuilder.DropColumn("PhysicalInterfaceStandardNumberSql", "MmcFeatures");
|
||||
|
||||
migrationBuilder.DropColumn("VolumeLevelsSql", "MmcFeatures");
|
||||
|
||||
migrationBuilder.DropColumn("ProductIDSql", "FireWire");
|
||||
|
||||
migrationBuilder.DropColumn("VendorIDSql", "FireWire");
|
||||
|
||||
migrationBuilder.DropColumn("CylindersSql", "Chs");
|
||||
|
||||
migrationBuilder.DropColumn("HeadsSql", "Chs");
|
||||
|
||||
migrationBuilder.DropColumn("SectorsSql", "Chs");
|
||||
|
||||
migrationBuilder.DropColumn("BlockLengthSql", "BlockDescriptor");
|
||||
|
||||
migrationBuilder.DropColumn("BlocksSql", "BlockDescriptor");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,8 +35,12 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<uint?>("BlockLength");
|
||||
|
||||
b.Property<int?>("BlockLengthSql");
|
||||
|
||||
b.Property<ulong?>("Blocks");
|
||||
|
||||
b.Property<long?>("BlocksSql");
|
||||
|
||||
b.Property<byte>("Density");
|
||||
|
||||
b.Property<int?>("ScsiModeId");
|
||||
@@ -54,10 +58,16 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<ushort>("Cylinders");
|
||||
|
||||
b.Property<short>("CylindersSql");
|
||||
|
||||
b.Property<ushort>("Heads");
|
||||
|
||||
b.Property<short>("HeadsSql");
|
||||
|
||||
b.Property<ushort>("Sectors");
|
||||
|
||||
b.Property<short>("SectorsSql");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Chs");
|
||||
@@ -86,10 +96,14 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<uint>("ProductID");
|
||||
|
||||
b.Property<int>("ProductIDSql");
|
||||
|
||||
b.Property<bool>("RemovableMedia");
|
||||
|
||||
b.Property<uint>("VendorID");
|
||||
|
||||
b.Property<int>("VendorIDSql");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("FireWire");
|
||||
@@ -124,6 +138,8 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<ushort?>("BlocksPerReadableUnit");
|
||||
|
||||
b.Property<short?>("BlocksPerReadableUnitSql");
|
||||
|
||||
b.Property<bool>("BufferUnderrunFreeInDVD");
|
||||
|
||||
b.Property<bool>("BufferUnderrunFreeInSAO");
|
||||
@@ -320,12 +336,14 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<uint?>("LogicalBlockSize");
|
||||
|
||||
b.Property<int?>("LogicalBlockSizeSql");
|
||||
|
||||
b.Property<bool>("MultiRead");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandard");
|
||||
|
||||
b.Property<uint?>("PhysicalInterfaceStandardNumber");
|
||||
|
||||
b.Property<int?>("PhysicalInterfaceStandardNumberSql");
|
||||
|
||||
b.Property<bool>("PreventJumper");
|
||||
|
||||
b.Property<bool>("SupportsAACS");
|
||||
@@ -364,6 +382,8 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<ushort?>("VolumeLevels");
|
||||
|
||||
b.Property<short?>("VolumeLevelsSql");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("MmcFeatures");
|
||||
@@ -396,12 +416,16 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<ushort?>("CardCode");
|
||||
|
||||
b.Property<short?>("CardCodeSql");
|
||||
|
||||
b.Property<string>("Compliance");
|
||||
|
||||
b.Property<string>("Manufacturer");
|
||||
|
||||
b.Property<ushort?>("ManufacturerCode");
|
||||
|
||||
b.Property<short?>("ManufacturerCodeSql");
|
||||
|
||||
b.Property<string>("ProductName");
|
||||
|
||||
b.HasKey("Id");
|
||||
@@ -498,8 +522,12 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<uint?>("MaxBlockLength");
|
||||
|
||||
b.Property<int?>("MaxBlockLengthSql");
|
||||
|
||||
b.Property<uint?>("MinBlockLength");
|
||||
|
||||
b.Property<int?>("MinBlockLengthSql");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Ssc");
|
||||
@@ -513,6 +541,8 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<ushort>("Length");
|
||||
|
||||
b.Property<short>("LengthSql");
|
||||
|
||||
b.Property<byte>("MediumType");
|
||||
|
||||
b.Property<string>("Name");
|
||||
@@ -525,6 +555,8 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<ushort>("Width");
|
||||
|
||||
b.Property<short>("WidthSql");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SscId");
|
||||
@@ -540,8 +572,12 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<uint>("BitsPerMm");
|
||||
|
||||
b.Property<int>("BitsPerMmSql");
|
||||
|
||||
b.Property<uint>("Capacity");
|
||||
|
||||
b.Property<int>("CapacitySql");
|
||||
|
||||
b.Property<bool>("DefaultDensity");
|
||||
|
||||
b.Property<string>("Description");
|
||||
@@ -562,8 +598,12 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<ushort>("Tracks");
|
||||
|
||||
b.Property<short>("TracksSql");
|
||||
|
||||
b.Property<ushort>("Width");
|
||||
|
||||
b.Property<short>("WidthSql");
|
||||
|
||||
b.Property<bool>("Writable");
|
||||
|
||||
b.HasKey("Id");
|
||||
@@ -583,8 +623,12 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<uint?>("BlockSize");
|
||||
|
||||
b.Property<int?>("BlockSizeSql");
|
||||
|
||||
b.Property<ulong?>("Blocks");
|
||||
|
||||
b.Property<long?>("BlocksSql");
|
||||
|
||||
b.Property<int?>("CHSId");
|
||||
|
||||
b.Property<bool?>("CanReadAACS");
|
||||
@@ -657,12 +701,20 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<ulong?>("LBA48Sectors");
|
||||
|
||||
b.Property<long?>("LBA48SectorsSql");
|
||||
|
||||
b.Property<uint?>("LBASectors");
|
||||
|
||||
b.Property<int?>("LBASectorsSql");
|
||||
|
||||
b.Property<ushort?>("LogicalAlignment");
|
||||
|
||||
b.Property<short?>("LogicalAlignmentSql");
|
||||
|
||||
b.Property<uint?>("LongBlockSize");
|
||||
|
||||
b.Property<int?>("LongBlockSizeSql");
|
||||
|
||||
b.Property<string>("Manufacturer");
|
||||
|
||||
b.Property<bool>("MediaIsRecognized");
|
||||
@@ -681,8 +733,12 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<ushort?>("NominalRotationRate");
|
||||
|
||||
b.Property<short?>("NominalRotationRateSql");
|
||||
|
||||
b.Property<uint?>("PhysicalBlockSize");
|
||||
|
||||
b.Property<int?>("PhysicalBlockSizeSql");
|
||||
|
||||
b.Property<int?>("ScsiId");
|
||||
|
||||
b.Property<bool?>("SolidStateDevice");
|
||||
@@ -755,8 +811,12 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<ushort?>("UnformattedBPS");
|
||||
|
||||
b.Property<short?>("UnformattedBPSSql");
|
||||
|
||||
b.Property<ushort?>("UnformattedBPT");
|
||||
|
||||
b.Property<short?>("UnformattedBPTSql");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("AtaId");
|
||||
@@ -815,10 +875,14 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
b.Property<ushort>("ProductID");
|
||||
|
||||
b.Property<short>("ProductIDSql");
|
||||
|
||||
b.Property<bool>("RemovableMedia");
|
||||
|
||||
b.Property<ushort>("VendorID");
|
||||
|
||||
b.Property<short>("VendorIDSql");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Usb");
|
||||
|
||||
@@ -209,6 +209,10 @@
|
||||
<Compile Include="Migrations\201812221606592_LinkDeviceStatsToReport.Designer.cs">
|
||||
<DependentUpon>201812221606592_LinkDeviceStatsToReport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\201812231612080_FixUnsignedFields.cs" />
|
||||
<Compile Include="Migrations\201812231612080_FixUnsignedFields.Designer.cs">
|
||||
<DependentUpon>201812231612080_FixUnsignedFields.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\Configuration.cs" />
|
||||
<Compile Include="Models\Command.cs" />
|
||||
<Compile Include="Models\Context.cs" />
|
||||
@@ -298,6 +302,9 @@
|
||||
<EmbeddedResource Include="Migrations\201812221606592_LinkDeviceStatsToReport.resx">
|
||||
<DependentUpon>201812221606592_LinkDeviceStatsToReport.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\201812231612080_FixUnsignedFields.resx">
|
||||
<DependentUpon>201812231612080_FixUnsignedFields.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
|
||||
29
DiscImageChef.Server/Migrations/201812231612080_FixUnsignedFields.Designer.cs
generated
Normal file
29
DiscImageChef.Server/Migrations/201812231612080_FixUnsignedFields.Designer.cs
generated
Normal file
@@ -0,0 +1,29 @@
|
||||
// <auto-generated />
|
||||
namespace DiscImageChef.Server.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
|
||||
public sealed partial class FixUnsignedFields : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(FixUnsignedFields));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201812231612080_FixUnsignedFields"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
namespace DiscImageChef.Server.Migrations
|
||||
{
|
||||
public partial class FixUnsignedFields : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
AddColumn("dbo.TestedMedias", "BlocksSql", c => c.Long());
|
||||
AddColumn("dbo.TestedMedias", "BlockSizeSql", c => c.Int());
|
||||
AddColumn("dbo.TestedMedias", "LongBlockSizeSql", c => c.Int());
|
||||
AddColumn("dbo.TestedMedias", "LBASectorsSql", c => c.Int());
|
||||
AddColumn("dbo.TestedMedias", "LBA48SectorsSql", c => c.Long());
|
||||
AddColumn("dbo.TestedMedias", "LogicalAlignmentSql", c => c.Short());
|
||||
AddColumn("dbo.TestedMedias", "NominalRotationRateSql", c => c.Short());
|
||||
AddColumn("dbo.TestedMedias", "PhysicalBlockSizeSql", c => c.Int());
|
||||
AddColumn("dbo.TestedMedias", "UnformattedBPTSql", c => c.Short());
|
||||
AddColumn("dbo.TestedMedias", "UnformattedBPSSql", c => c.Short());
|
||||
AddColumn("dbo.Chs", "CylindersSql", c => c.Short(false));
|
||||
AddColumn("dbo.Chs", "HeadsSql", c => c.Short(false));
|
||||
AddColumn("dbo.Chs", "SectorsSql", c => c.Short(false));
|
||||
AddColumn("dbo.FireWires", "VendorIDSql", c => c.Int(false));
|
||||
AddColumn("dbo.FireWires", "ProductIDSql", c => c.Int(false));
|
||||
AddColumn("dbo.Pcmcias", "ManufacturerCodeSql", c => c.Short());
|
||||
AddColumn("dbo.Pcmcias", "CardCodeSql", c => c.Short());
|
||||
AddColumn("dbo.BlockDescriptors", "BlocksSql", c => c.Long());
|
||||
AddColumn("dbo.BlockDescriptors", "BlockLengthSql", c => c.Int());
|
||||
AddColumn("dbo.MmcFeatures", "BlocksPerReadableUnitSql", c => c.Short());
|
||||
AddColumn("dbo.MmcFeatures", "LogicalBlockSizeSql", c => c.Int());
|
||||
AddColumn("dbo.MmcFeatures", "PhysicalInterfaceStandardNumberSql", c => c.Int());
|
||||
AddColumn("dbo.MmcFeatures", "VolumeLevelsSql", c => c.Short());
|
||||
AddColumn("dbo.Sscs", "MaxBlockLengthSql", c => c.Int());
|
||||
AddColumn("dbo.Sscs", "MinBlockLengthSql", c => c.Int());
|
||||
AddColumn("dbo.SupportedDensities", "BitsPerMmSql", c => c.Int(false));
|
||||
AddColumn("dbo.SupportedDensities", "WidthSql", c => c.Short(false));
|
||||
AddColumn("dbo.SupportedDensities", "TracksSql", c => c.Short(false));
|
||||
AddColumn("dbo.SupportedDensities", "CapacitySql", c => c.Int(false));
|
||||
AddColumn("dbo.SscSupportedMedias", "WidthSql", c => c.Short(false));
|
||||
AddColumn("dbo.SscSupportedMedias", "LengthSql", c => c.Short(false));
|
||||
AddColumn("dbo.Usbs", "VendorIDSql", c => c.Short(false));
|
||||
AddColumn("dbo.Usbs", "ProductIDSql", c => c.Short(false));
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropColumn("dbo.Usbs", "ProductIDSql");
|
||||
DropColumn("dbo.Usbs", "VendorIDSql");
|
||||
DropColumn("dbo.SscSupportedMedias", "LengthSql");
|
||||
DropColumn("dbo.SscSupportedMedias", "WidthSql");
|
||||
DropColumn("dbo.SupportedDensities", "CapacitySql");
|
||||
DropColumn("dbo.SupportedDensities", "TracksSql");
|
||||
DropColumn("dbo.SupportedDensities", "WidthSql");
|
||||
DropColumn("dbo.SupportedDensities", "BitsPerMmSql");
|
||||
DropColumn("dbo.Sscs", "MinBlockLengthSql");
|
||||
DropColumn("dbo.Sscs", "MaxBlockLengthSql");
|
||||
DropColumn("dbo.MmcFeatures", "VolumeLevelsSql");
|
||||
DropColumn("dbo.MmcFeatures", "PhysicalInterfaceStandardNumberSql");
|
||||
DropColumn("dbo.MmcFeatures", "LogicalBlockSizeSql");
|
||||
DropColumn("dbo.MmcFeatures", "BlocksPerReadableUnitSql");
|
||||
DropColumn("dbo.BlockDescriptors", "BlockLengthSql");
|
||||
DropColumn("dbo.BlockDescriptors", "BlocksSql");
|
||||
DropColumn("dbo.Pcmcias", "CardCodeSql");
|
||||
DropColumn("dbo.Pcmcias", "ManufacturerCodeSql");
|
||||
DropColumn("dbo.FireWires", "ProductIDSql");
|
||||
DropColumn("dbo.FireWires", "VendorIDSql");
|
||||
DropColumn("dbo.Chs", "SectorsSql");
|
||||
DropColumn("dbo.Chs", "HeadsSql");
|
||||
DropColumn("dbo.Chs", "CylindersSql");
|
||||
DropColumn("dbo.TestedMedias", "UnformattedBPSSql");
|
||||
DropColumn("dbo.TestedMedias", "UnformattedBPTSql");
|
||||
DropColumn("dbo.TestedMedias", "PhysicalBlockSizeSql");
|
||||
DropColumn("dbo.TestedMedias", "NominalRotationRateSql");
|
||||
DropColumn("dbo.TestedMedias", "LogicalAlignmentSql");
|
||||
DropColumn("dbo.TestedMedias", "LBA48SectorsSql");
|
||||
DropColumn("dbo.TestedMedias", "LBASectorsSql");
|
||||
DropColumn("dbo.TestedMedias", "LongBlockSizeSql");
|
||||
DropColumn("dbo.TestedMedias", "BlockSizeSql");
|
||||
DropColumn("dbo.TestedMedias", "BlocksSql");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -176,4 +176,5 @@
|
||||
</Entry>
|
||||
</TypePattern>
|
||||
</Patterns></s:String>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ATAPI/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
Reference in New Issue
Block a user