// /*************************************************************************** // The Disc Image Chef // ---------------------------------------------------------------------------- // // Filename : 20180805163101_InitialCreate.cs // Author(s) : Natalia Portillo // // Component : Database. // // --[ Description ] ---------------------------------------------------------- // // Initial database status. // // --[ License ] -------------------------------------------------------------- // // This library is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation; either version 2.1 of the // License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, see . // // ---------------------------------------------------------------------------- // Copyright © 2011-2018 Natalia Portillo // ****************************************************************************/ using System; using Microsoft.EntityFrameworkCore.Migrations; namespace DiscImageChef.Database.Migrations { public partial class InitialCreate : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable("CHS", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), Cylinders = table.Column(nullable: false), Heads = table.Column(nullable: false), Sectors = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_CHS", x => x.Id); }); migrationBuilder.CreateTable("Features", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), AACSVersion = table.Column(nullable: true), AGIDs = table.Column(nullable: true), BindingNonceBlocks = table.Column(nullable: true), BlocksPerReadableUnit = table.Column(nullable: true), BufferUnderrunFreeInDVD = table.Column(nullable: false), BufferUnderrunFreeInSAO = table.Column(nullable: false), BufferUnderrunFreeInTAO = table.Column(nullable: false), CanAudioScan = table.Column(nullable: false), CanEject = table.Column(nullable: false), CanEraseSector = table.Column(nullable: false), CanExpandBDRESpareArea = table.Column(nullable: false), CanFormat = table.Column(nullable: false), CanFormatBDREWithoutSpare = table.Column(nullable: false), CanFormatCert = table.Column(nullable: false), CanFormatFRF = table.Column(nullable: false), CanFormatQCert = table.Column(nullable: false), CanFormatRRM = table.Column(nullable: false), CanGenerateBindingNonce = table.Column(nullable: false), CanLoad = table.Column(nullable: false), CanMuteSeparateChannels = table.Column(nullable: false), CanOverwriteSAOTrack = table.Column(nullable: false), CanOverwriteTAOTrack = table.Column(nullable: false), CanPlayCDAudio = table.Column(nullable: false), CanPseudoOverwriteBDR = table.Column(nullable: false), CanReadAllDualR = table.Column(nullable: false), CanReadAllDualRW = table.Column(nullable: false), CanReadBD = table.Column(nullable: false), CanReadBDR = table.Column(nullable: false), CanReadBDRE1 = table.Column(nullable: false), CanReadBDRE2 = table.Column(nullable: false), CanReadBDROM = table.Column(nullable: false), CanReadBluBCA = table.Column(nullable: false), CanReadCD = table.Column(nullable: false), CanReadCDMRW = table.Column(nullable: false), CanReadCPRM_MKB = table.Column(nullable: false), CanReadDDCD = table.Column(nullable: false), CanReadDVD = table.Column(nullable: false), CanReadDVDPlusMRW = table.Column(nullable: false), CanReadDVDPlusR = table.Column(nullable: false), CanReadDVDPlusRDL = table.Column(nullable: false), CanReadDVDPlusRW = table.Column(nullable: false), CanReadDVDPlusRWDL = table.Column(nullable: false), CanReadDriveAACSCertificate = table.Column(nullable: false), CanReadHDDVD = table.Column(nullable: false), CanReadHDDVDR = table.Column(nullable: false), CanReadHDDVDRAM = table.Column(nullable: false), CanReadLeadInCDText = table.Column(nullable: false), CanReadOldBDR = table.Column(nullable: false), CanReadOldBDRE = table.Column(nullable: false), CanReadOldBDROM = table.Column(nullable: false), CanReadSpareAreaInformation = table.Column(nullable: false), CanReportDriveSerial = table.Column(nullable: false), CanReportMediaSerial = table.Column(nullable: false), CanTestWriteDDCDR = table.Column(nullable: false), CanTestWriteDVD = table.Column(nullable: false), CanTestWriteInSAO = table.Column(nullable: false), CanTestWriteInTAO = table.Column(nullable: false), CanUpgradeFirmware = table.Column(nullable: false), CanWriteBD = table.Column(nullable: false), CanWriteBDR = table.Column(nullable: false), CanWriteBDRE1 = table.Column(nullable: false), CanWriteBDRE2 = table.Column(nullable: false), CanWriteBusEncryptedBlocks = table.Column(nullable: false), CanWriteCDMRW = table.Column(nullable: false), CanWriteCDRW = table.Column(nullable: false), CanWriteCDRWCAV = table.Column(nullable: false), CanWriteCDSAO = table.Column(nullable: false), CanWriteCDTAO = table.Column(nullable: false), CanWriteCSSManagedDVD = table.Column(nullable: false), CanWriteDDCDR = table.Column(nullable: false), CanWriteDDCDRW = table.Column(nullable: false), CanWriteDVDPlusMRW = table.Column(nullable: false), CanWriteDVDPlusR = table.Column(nullable: false), CanWriteDVDPlusRDL = table.Column(nullable: false), CanWriteDVDPlusRW = table.Column(nullable: false), CanWriteDVDPlusRWDL = table.Column(nullable: false), CanWriteDVDR = table.Column(nullable: false), CanWriteDVDRDL = table.Column(nullable: false), CanWriteDVDRW = table.Column(nullable: false), CanWriteHDDVDR = table.Column(nullable: false), CanWriteHDDVDRAM = table.Column(nullable: false), CanWriteOldBDR = table.Column(nullable: false), CanWriteOldBDRE = table.Column(nullable: false), CanWritePackedSubchannelInTAO = table.Column(nullable: false), CanWriteRWSubchannelInSAO = table.Column(nullable: false), CanWriteRWSubchannelInTAO = table.Column(nullable: false), CanWriteRaw = table.Column(nullable: false), CanWriteRawMultiSession = table.Column(nullable: false), CanWriteRawSubchannelInTAO = table.Column(nullable: false), ChangerIsSideChangeCapable = table.Column(nullable: false), ChangerSlots = table.Column(nullable: false), ChangerSupportsDiscPresent = table.Column(nullable: true), CPRMVersion = table.Column(nullable: true), CSSVersion = table.Column(nullable: true), DBML = table.Column(nullable: false), DVDMultiRead = table.Column(nullable: false), EmbeddedChanger = table.Column(nullable: false), ErrorRecoveryPage = table.Column(nullable: false), FirmwareDate = table.Column(nullable: true), LoadingMechanismType = table.Column(nullable: true), Locked = table.Column(nullable: false), LogicalBlockSize = table.Column(nullable: true), MultiRead = table.Column(nullable: false), PhysicalInterfaceStandard = table.Column(nullable: true), PhysicalInterfaceStandardNumber = table.Column(nullable: true), PreventJumper = table.Column(nullable: false), SupportsAACS = table.Column(nullable: false), SupportsBusEncryption = table.Column(nullable: false), SupportsC2 = table.Column(nullable: false), SupportsCPRM = table.Column(nullable: false), SupportsCSS = table.Column(nullable: false), SupportsDAP = table.Column(nullable: false), SupportsDeviceBusyEvent = table.Column(nullable: false), SupportsHybridDiscs = table.Column(nullable: false), SupportsModePage1Ch = table.Column(nullable: false), SupportsOSSC = table.Column(nullable: false), SupportsPWP = table.Column(nullable: false), SupportsSWPP = table.Column(nullable: false), SupportsSecurDisc = table.Column(nullable: false), SupportsSeparateVolume = table.Column(nullable: false), SupportsVCPS = table.Column(nullable: false), SupportsWriteInhibitDCB = table.Column(nullable: false), SupportsWriteProtectPAC = table.Column(nullable: false), VolumeLevels = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_Features", x => x.Id); }); migrationBuilder.CreateTable("FireWire", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), VendorID = table.Column(nullable: false), ProductID = table.Column(nullable: false), Manufacturer = table.Column(nullable: true), Product = table.Column(nullable: true), RemovableMedia = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_FireWire", x => x.Id); }); migrationBuilder.CreateTable("Inquiry", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), AccessControlCoordinator = table.Column(nullable: false), ACKRequests = table.Column(nullable: false), AERCSupported = table.Column(nullable: false), Address16 = table.Column(nullable: false), Address32 = table.Column(nullable: false), ANSIVersion = table.Column(nullable: true), AsymmetricalLUNAccess = table.Column(nullable: false), BasicQueueing = table.Column(nullable: false), DeviceTypeModifier = table.Column(nullable: true), ECMAVersion = table.Column(nullable: true), EnclosureServices = table.Column(nullable: false), HierarchicalLUN = table.Column(nullable: false), IUS = table.Column(nullable: false), ISOVersion = table.Column(nullable: true), LinkedCommands = table.Column(nullable: false), MediumChanger = table.Column(nullable: false), MultiPortDevice = table.Column(nullable: false), NormalACA = table.Column(nullable: false), PeripheralDeviceType = table.Column(nullable: false), PeripheralQualifier = table.Column(nullable: false), ProductIdentification = table.Column(nullable: true), ProductRevisionLevel = table.Column(nullable: true), Protection = table.Column(nullable: false), QAS = table.Column(nullable: false), RelativeAddressing = table.Column(nullable: false), Removable = table.Column(nullable: false), ResponseDataFormat = table.Column(nullable: true), TaggedCommandQueue = table.Column(nullable: false), TerminateTaskSupported = table.Column(nullable: false), ThirdPartyCopy = table.Column(nullable: false), TranferDisable = table.Column(nullable: false), SoftReset = table.Column(nullable: false), SPIClocking = table.Column(nullable: false), StorageArrayController = table.Column(nullable: false), SyncTransfer = table.Column(nullable: false), VendorIdentification = table.Column(nullable: true), WideBus16 = table.Column(nullable: false), WideBus32 = table.Column(nullable: false), Data = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_Inquiry", x => x.Id); }); migrationBuilder.CreateTable("Mode", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), MediumType = table.Column(nullable: true), WriteProtected = table.Column(nullable: false), Speed = table.Column(nullable: true), BufferedMode = table.Column(nullable: true), BlankCheckEnabled = table.Column(nullable: false), DPOandFUA = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_Mode", x => x.Id); }); migrationBuilder.CreateTable("Mode2A", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), AccurateCDDA = table.Column(nullable: false), BCK = table.Column(nullable: false), BufferSize = table.Column(nullable: false), BufferUnderRunProtection = table.Column(nullable: true), CanEject = table.Column(nullable: false), CanLockMedia = table.Column(nullable: false), CDDACommand = table.Column(nullable: false), CompositeAudioVideo = table.Column(nullable: false), CSSandCPPMSupported = table.Column(nullable: false), CurrentSpeed = table.Column(nullable: true), CurrentWriteSpeed = table.Column(nullable: true), CurrentWriteSpeedSelected = table.Column(nullable: true), DeterministicSlotChanger = table.Column(nullable: false), DigitalPort1 = table.Column(nullable: false), DigitalPort2 = table.Column(nullable: false), LeadInPW = table.Column(nullable: false), LoadingMechanismType = table.Column(nullable: false), LockStatus = table.Column(nullable: false), LSBF = table.Column(nullable: false), MaximumSpeed = table.Column(nullable: true), MaximumWriteSpeed = table.Column(nullable: true), PlaysAudio = table.Column(nullable: false), PreventJumperStatus = table.Column(nullable: false), RCK = table.Column(nullable: false), ReadsBarcode = table.Column(nullable: false), ReadsBothSides = table.Column(nullable: false), ReadsCDR = table.Column(nullable: false), ReadsCDRW = table.Column(nullable: false), ReadsDeinterlavedSubchannel = table.Column(nullable: false), ReadsDVDR = table.Column(nullable: false), ReadsDVDRAM = table.Column(nullable: false), ReadsDVDROM = table.Column(nullable: false), ReadsISRC = table.Column(nullable: false), ReadsMode2Form2 = table.Column(nullable: false), ReadsMode2Form1 = table.Column(nullable: false), ReadsPacketCDR = table.Column(nullable: false), ReadsSubchannel = table.Column(nullable: false), ReadsUPC = table.Column(nullable: false), ReturnsC2Pointers = table.Column(nullable: false), RotationControlSelected = table.Column(nullable: true), SeparateChannelMute = table.Column(nullable: false), SeparateChannelVolume = table.Column(nullable: false), SSS = table.Column(nullable: false), SupportsMultiSession = table.Column(nullable: false), SupportedVolumeLevels = table.Column(nullable: true), TestWrite = table.Column(nullable: false), WritesCDR = table.Column(nullable: false), WritesCDRW = table.Column(nullable: false), WritesDVDR = table.Column(nullable: false), WritesDVDRAM = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_Mode2A", x => x.Id); }); migrationBuilder.CreateTable("PCMCIA", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), CIS = table.Column(nullable: true), Compliance = table.Column(nullable: true), ManufacturerCode = table.Column(nullable: false), CardCode = table.Column(nullable: false), Manufacturer = table.Column(nullable: true), ProductName = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_PCMCIA", x => x.Id); }); migrationBuilder.CreateTable("SecureDigital", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), CID = table.Column(nullable: true), CSD = table.Column(nullable: true), OCR = table.Column(nullable: true), SCR = table.Column(nullable: true), ExtendedCSD = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_SecureDigital", x => x.Id); }); migrationBuilder.CreateTable("SSC", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), BlockSizeGranularity = table.Column(nullable: true), MaxBlockLength = table.Column(nullable: true), MinBlockLength = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_SSC", x => x.Id); }); migrationBuilder.CreateTable("USB", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), VendorID = table.Column(nullable: false), ProductID = table.Column(nullable: false), Manufacturer = table.Column(nullable: true), Product = table.Column(nullable: true), RemovableMedia = table.Column(nullable: false), Descriptors = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_USB", x => x.Id); }); migrationBuilder.CreateTable("UshortClass", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), Value = table.Column(nullable: false), InquiryId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_UshortClass", x => x.Id); table.ForeignKey("FK_UshortClass_Inquiry_InquiryId", x => x.InquiryId, "Inquiry", "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("BlockDescriptor", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), Density = table.Column(nullable: false), Blocks = table.Column(nullable: true), BlockLength = table.Column(nullable: true), ModeId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_BlockDescriptor", x => x.Id); table.ForeignKey("FK_BlockDescriptor_Mode_ModeId", x => x.ModeId, "Mode", "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("ModePage", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), page = table.Column(nullable: false), subpage = table.Column(nullable: false), value = table.Column(nullable: true), ModeId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_ModePage", x => x.Id); table.ForeignKey("FK_ModePage_Mode_ModeId", x => x.ModeId, "Mode", "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("MMC", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), ModeSense2AId = table.Column(nullable: true), FeaturesId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_MMC", x => x.Id); table.ForeignKey("FK_MMC_Features_FeaturesId", x => x.FeaturesId, "Features", "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey("FK_MMC_Mode2A_ModeSense2AId", x => x.ModeSense2AId, "Mode2A", "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("WriteDescriptor", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), RotationControl = table.Column(nullable: false), WriteSpeed = table.Column(nullable: false), Mode2AId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_WriteDescriptor", x => x.Id); table.ForeignKey("FK_WriteDescriptor_Mode2A_Mode2AId", x => x.Mode2AId, "Mode2A", "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("StringClass", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), Value = table.Column(nullable: false), PCMCIAId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_StringClass", x => x.Id); table.ForeignKey("FK_StringClass_PCMCIA_PCMCIAId", x => x.PCMCIAId, "PCMCIA", "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("SequentialMedia", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), CanReadMediaSerial = table.Column(nullable: true), Density = table.Column(nullable: true), Manufacturer = table.Column(nullable: true), MediaIsRecognized = table.Column(nullable: false), MediumType = table.Column(nullable: true), MediumTypeName = table.Column(nullable: true), Model = table.Column(nullable: true), ModeSense6Data = table.Column(nullable: true), ModeSense10Data = table.Column(nullable: true), SSCId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_SequentialMedia", x => x.Id); table.ForeignKey("FK_SequentialMedia_SSC_SSCId", x => x.SSCId, "SSC", "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("SupportedDensity", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), PrimaryCode = table.Column(nullable: false), SecondaryCode = table.Column(nullable: false), Writable = table.Column(nullable: false), Duplicate = table.Column(nullable: false), DefaultDensity = table.Column(nullable: false), BitsPerMm = table.Column(nullable: false), Width = table.Column(nullable: false), Tracks = table.Column(nullable: false), Capacity = table.Column(nullable: false), Organization = table.Column(nullable: true), Name = table.Column(nullable: true), Description = table.Column(nullable: true), SSCId = table.Column(nullable: true), SequentialMediaId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_SupportedDensity", x => x.Id); table.ForeignKey("FK_SupportedDensity_SSC_SSCId", x => x.SSCId, "SSC", "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey("FK_SupportedDensity_SequentialMedia_SequentialMediaId", x => x.SequentialMediaId, "SequentialMedia", "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("SupportedMedia", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), MediumType = table.Column(nullable: false), Width = table.Column(nullable: false), Length = table.Column(nullable: false), Organization = table.Column(nullable: true), Name = table.Column(nullable: true), Description = table.Column(nullable: true), SSCId = table.Column(nullable: true), SequentialMediaId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_SupportedMedia", x => x.Id); table.ForeignKey("FK_SupportedMedia_SSC_SSCId", x => x.SSCId, "SSC", "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey("FK_SupportedMedia_SequentialMedia_SequentialMediaId", x => x.SequentialMediaId, "SequentialMedia", "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("IntClass", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), Value = table.Column(nullable: false), SupportedMediaId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_IntClass", x => x.Id); table.ForeignKey("FK_IntClass_SupportedMedia_SupportedMediaId", x => x.SupportedMediaId, "SupportedMedia", "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("Device", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), WhenAdded = table.Column(nullable: false), WhenModified = table.Column(nullable: true), Manufacturer = table.Column(nullable: true), Model = table.Column(nullable: true), Revision = table.Column(nullable: true), Type = table.Column(nullable: false), USBId = table.Column(nullable: true), FireWireId = table.Column(nullable: true), PCMCIAId = table.Column(nullable: true), ATAId = table.Column(nullable: true), ATAPIId = table.Column(nullable: true), SCSIId = table.Column(nullable: true), MultiMediaCardId = table.Column(nullable: true), SecureDigitalId = table.Column(nullable: true), IsValid = table.Column(nullable: false), TimesSeen = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_Device", x => x.Id); table.ForeignKey("FK_Device_FireWire_FireWireId", x => x.FireWireId, "FireWire", "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey("FK_Device_SecureDigital_MultiMediaCardId", x => x.MultiMediaCardId, "SecureDigital", "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey("FK_Device_PCMCIA_PCMCIAId", x => x.PCMCIAId, "PCMCIA", "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey("FK_Device_SecureDigital_SecureDigitalId", x => x.SecureDigitalId, "SecureDigital", "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey("FK_Device_USB_USBId", x => x.USBId, "USB", "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("TestedMedia", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), Blocks = table.Column(nullable: true), BlockSize = table.Column(nullable: true), CanReadAACS = table.Column(nullable: true), CanReadADIP = table.Column(nullable: true), CanReadATIP = table.Column(nullable: true), CanReadBCA = table.Column(nullable: true), CanReadC2Pointers = table.Column(nullable: true), CanReadCMI = table.Column(nullable: true), CanReadCorrectedSubchannel = table.Column(nullable: true), CanReadCorrectedSubchannelWithC2 = table.Column(nullable: true), CanReadDCB = table.Column(nullable: true), CanReadDDS = table.Column(nullable: true), CanReadDMI = table.Column(nullable: true), CanReadDiscInformation = table.Column(nullable: true), CanReadFullTOC = table.Column(nullable: true), CanReadHDCMI = table.Column(nullable: true), CanReadLayerCapacity = table.Column(nullable: true), CanReadLeadIn = table.Column(nullable: true), CanReadLeadInPostgap = table.Column(nullable: true), CanReadLeadOut = table.Column(nullable: true), CanReadMediaID = table.Column(nullable: true), CanReadMediaSerial = table.Column(nullable: true), CanReadPAC = table.Column(nullable: true), CanReadPFI = table.Column(nullable: true), CanReadPMA = table.Column(nullable: true), CanReadPQSubchannel = table.Column(nullable: true), CanReadPQSubchannelWithC2 = table.Column(nullable: true), CanReadPRI = table.Column(nullable: true), CanReadRWSubchannel = table.Column(nullable: true), CanReadRWSubchannelWithC2 = table.Column(nullable: true), CanReadRecordablePFI = table.Column(nullable: true), CanReadSpareAreaInformation = table.Column(nullable: true), CanReadTOC = table.Column(nullable: true), Density = table.Column(nullable: true), LongBlockSize = table.Column(nullable: true), Manufacturer = table.Column(nullable: true), MediaIsRecognized = table.Column(nullable: false), MediumType = table.Column(nullable: true), MediumTypeName = table.Column(nullable: true), Model = table.Column(nullable: true), SupportsHLDTSTReadRawDVD = table.Column(nullable: true), SupportsNECReadCDDA = table.Column(nullable: true), SupportsPioneerReadCDDA = table.Column(nullable: true), SupportsPioneerReadCDDAMSF = table.Column(nullable: true), SupportsPlextorReadCDDA = table.Column(nullable: true), SupportsPlextorReadRawDVD = table.Column(nullable: true), SupportsRead10 = table.Column(nullable: true), SupportsRead12 = table.Column(nullable: true), SupportsRead16 = table.Column(nullable: true), SupportsRead = table.Column(nullable: true), SupportsReadCapacity16 = table.Column(nullable: true), SupportsReadCapacity = table.Column(nullable: true), SupportsReadCd = table.Column(nullable: true), SupportsReadCdMsf = table.Column(nullable: true), SupportsReadCdRaw = table.Column(nullable: true), SupportsReadCdMsfRaw = table.Column(nullable: true), SupportsReadLong16 = table.Column(nullable: true), SupportsReadLong = table.Column(nullable: true), ModeSense6Data = table.Column(nullable: true), ModeSense10Data = table.Column(nullable: true), CHSId = table.Column(nullable: true), CurrentCHSId = table.Column(nullable: true), LBASectors = table.Column(nullable: true), LBA48Sectors = table.Column(nullable: true), LogicalAlignment = table.Column(nullable: true), NominalRotationRate = table.Column(nullable: true), PhysicalBlockSize = table.Column(nullable: true), SolidStateDevice = table.Column(nullable: true), UnformattedBPT = table.Column(nullable: true), UnformattedBPS = table.Column(nullable: true), SupportsReadDmaLba = table.Column(nullable: true), SupportsReadDmaRetryLba = table.Column(nullable: true), SupportsReadLba = table.Column(nullable: true), SupportsReadRetryLba = table.Column(nullable: true), SupportsReadLongLba = table.Column(nullable: true), SupportsReadLongRetryLba = table.Column(nullable: true), SupportsSeekLba = table.Column(nullable: true), SupportsReadDmaLba48 = table.Column(nullable: true), SupportsReadLba48 = table.Column(nullable: true), SupportsReadDma = table.Column(nullable: true), SupportsReadDmaRetry = table.Column(nullable: true), SupportsReadRetry = table.Column(nullable: true), SupportsReadLongRetry = table.Column(nullable: true), SupportsSeek = table.Column(nullable: true), ATAId = table.Column(nullable: true), MMCId = table.Column(nullable: true), SCSIId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_TestedMedia", x => x.Id); table.ForeignKey("FK_TestedMedia_CHS_CHSId", x => x.CHSId, "CHS", "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey("FK_TestedMedia_CHS_CurrentCHSId", x => x.CurrentCHSId, "CHS", "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey("FK_TestedMedia_MMC_MMCId", x => x.MMCId, "MMC", "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("ATA", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), AdditionalPID = table.Column(nullable: true), APIOSupported = table.Column(nullable: true), ATAPIByteCount = table.Column(nullable: true), BufferType = table.Column(nullable: true), BufferSize = table.Column(nullable: true), Capabilities = table.Column(nullable: true), Capabilities2 = table.Column(nullable: true), Capabilities3 = table.Column(nullable: true), CFAPowerMode = table.Column(nullable: true), CommandSet = table.Column(nullable: true), CommandSet2 = table.Column(nullable: true), CommandSet3 = table.Column(nullable: true), CommandSet4 = table.Column(nullable: true), CommandSet5 = table.Column(nullable: true), CurrentAAM = table.Column(nullable: true), CurrentAPM = table.Column(nullable: true), DataSetMgmt = table.Column(nullable: true), DataSetMgmtSize = table.Column(nullable: true), DeviceFormFactor = table.Column(nullable: true), DMAActive = table.Column(nullable: true), DMASupported = table.Column(nullable: true), DMATransferTimingMode = table.Column(nullable: true), EnhancedSecurityEraseTime = table.Column(nullable: true), EnabledCommandSet = table.Column(nullable: true), EnabledCommandSet2 = table.Column(nullable: true), EnabledCommandSet3 = table.Column(nullable: true), EnabledCommandSet4 = table.Column(nullable: true), EnabledSATAFeatures = table.Column(nullable: true), ExtendedUserSectors = table.Column(nullable: true), FreeFallSensitivity = table.Column(nullable: true), FirmwareRevision = table.Column(nullable: true), GeneralConfiguration = table.Column(nullable: true), HardwareResetResult = table.Column(nullable: true), InterseekDelay = table.Column(nullable: true), MajorVersion = table.Column(nullable: true), MasterPasswordRevisionCode = table.Column(nullable: true), MaxDownloadMicroMode3 = table.Column(nullable: true), MaxQueueDepth = table.Column(nullable: true), MDMAActive = table.Column(nullable: true), MDMASupported = table.Column(nullable: true), MinDownloadMicroMode3 = table.Column(nullable: true), MinMDMACycleTime = table.Column(nullable: true), MinorVersion = table.Column(nullable: true), MinPIOCycleTimeNoFlow = table.Column(nullable: true), MinPIOCycleTimeFlow = table.Column(nullable: true), Model = table.Column(nullable: true), MultipleMaxSectors = table.Column(nullable: true), MultipleSectorNumber = table.Column(nullable: true), NVCacheCaps = table.Column(nullable: true), NVCacheSize = table.Column(nullable: true), NVCacheWriteSpeed = table.Column(nullable: true), NVEstimatedSpinUp = table.Column(nullable: true), PacketBusRelease = table.Column(nullable: true), PIOTransferTimingMode = table.Column(nullable: true), RecommendedAAM = table.Column(nullable: true), RecommendedMDMACycleTime = table.Column(nullable: true), RemovableStatusSet = table.Column(nullable: true), SATACapabilities = table.Column(nullable: true), SATACapabilities2 = table.Column(nullable: true), SATAFeatures = table.Column(nullable: true), SCTCommandTransport = table.Column(nullable: true), SectorsPerCard = table.Column(nullable: true), SecurityEraseTime = table.Column(nullable: true), SecurityStatus = table.Column(nullable: true), ServiceBusyClear = table.Column(nullable: true), SpecificConfiguration = table.Column(nullable: true), StreamAccessLatency = table.Column(nullable: true), StreamMinReqSize = table.Column(nullable: true), StreamPerformanceGranularity = table.Column(nullable: true), StreamTransferTimeDMA = table.Column(nullable: true), StreamTransferTimePIO = table.Column(nullable: true), TransportMajorVersion = table.Column(nullable: true), TransportMinorVersion = table.Column(nullable: true), TrustedComputing = table.Column(nullable: true), UDMAActive = table.Column(nullable: true), UDMASupported = table.Column(nullable: true), WRVMode = table.Column(nullable: true), WRVSectorCountMode3 = table.Column(nullable: true), WRVSectorCountMode2 = table.Column(nullable: true), Identify = table.Column(nullable: true), ReadCapabilitiesId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_ATA", x => x.Id); table.ForeignKey("FK_ATA_TestedMedia_ReadCapabilitiesId", x => x.ReadCapabilitiesId, "TestedMedia", "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("SCSI", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), InquiryId = table.Column(nullable: true), SupportsModeSense6 = table.Column(nullable: false), SupportsModeSense10 = table.Column(nullable: false), SupportsModeSubpages = table.Column(nullable: false), ModeSenseId = table.Column(nullable: true), MultiMediaDeviceId = table.Column(nullable: true), ReadCapabilitiesId = table.Column(nullable: true), SequentialDeviceId = table.Column(nullable: true), ModeSense6Data = table.Column(nullable: true), ModeSense10Data = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_SCSI", x => x.Id); table.ForeignKey("FK_SCSI_Inquiry_InquiryId", x => x.InquiryId, "Inquiry", "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey("FK_SCSI_Mode_ModeSenseId", x => x.ModeSenseId, "Mode", "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey("FK_SCSI_MMC_MultiMediaDeviceId", x => x.MultiMediaDeviceId, "MMC", "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey("FK_SCSI_TestedMedia_ReadCapabilitiesId", x => x.ReadCapabilitiesId, "TestedMedia", "Id", onDelete: ReferentialAction.Restrict); table.ForeignKey("FK_SCSI_SSC_SequentialDeviceId", x => x.SequentialDeviceId, "SSC", "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable("Page", table => new { Id = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true), page = table.Column(nullable: false), value = table.Column(nullable: true), SCSIId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_Page", x => x.Id); table.ForeignKey("FK_Page_SCSI_SCSIId", x => x.SCSIId, "SCSI", "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex("IX_ATA_ReadCapabilitiesId", "ATA", "ReadCapabilitiesId"); migrationBuilder.CreateIndex("IX_BlockDescriptor_ModeId", "BlockDescriptor", "ModeId"); migrationBuilder.CreateIndex("IX_Device_ATAId", "Device", "ATAId"); migrationBuilder.CreateIndex("IX_Device_ATAPIId", "Device", "ATAPIId"); migrationBuilder.CreateIndex("IX_Device_FireWireId", "Device", "FireWireId"); migrationBuilder.CreateIndex("IX_Device_MultiMediaCardId", "Device", "MultiMediaCardId"); migrationBuilder.CreateIndex("IX_Device_PCMCIAId", "Device", "PCMCIAId"); migrationBuilder.CreateIndex("IX_Device_SCSIId", "Device", "SCSIId"); migrationBuilder.CreateIndex("IX_Device_SecureDigitalId", "Device", "SecureDigitalId"); migrationBuilder.CreateIndex("IX_Device_USBId", "Device", "USBId"); migrationBuilder.CreateIndex("IX_IntClass_SupportedMediaId", "IntClass", "SupportedMediaId"); migrationBuilder.CreateIndex("IX_MMC_FeaturesId", "MMC", "FeaturesId"); migrationBuilder.CreateIndex("IX_MMC_ModeSense2AId", "MMC", "ModeSense2AId"); migrationBuilder.CreateIndex("IX_ModePage_ModeId", "ModePage", "ModeId"); migrationBuilder.CreateIndex("IX_Page_SCSIId", "Page", "SCSIId"); migrationBuilder.CreateIndex("IX_SCSI_InquiryId", "SCSI", "InquiryId"); migrationBuilder.CreateIndex("IX_SCSI_ModeSenseId", "SCSI", "ModeSenseId"); migrationBuilder.CreateIndex("IX_SCSI_MultiMediaDeviceId", "SCSI", "MultiMediaDeviceId"); migrationBuilder.CreateIndex("IX_SCSI_ReadCapabilitiesId", "SCSI", "ReadCapabilitiesId"); migrationBuilder.CreateIndex("IX_SCSI_SequentialDeviceId", "SCSI", "SequentialDeviceId"); migrationBuilder.CreateIndex("IX_SequentialMedia_SSCId", "SequentialMedia", "SSCId"); migrationBuilder.CreateIndex("IX_StringClass_PCMCIAId", "StringClass", "PCMCIAId"); migrationBuilder.CreateIndex("IX_SupportedDensity_SSCId", "SupportedDensity", "SSCId"); migrationBuilder.CreateIndex("IX_SupportedDensity_SequentialMediaId", "SupportedDensity", "SequentialMediaId"); migrationBuilder.CreateIndex("IX_SupportedMedia_SSCId", "SupportedMedia", "SSCId"); migrationBuilder.CreateIndex("IX_SupportedMedia_SequentialMediaId", "SupportedMedia", "SequentialMediaId"); migrationBuilder.CreateIndex("IX_TestedMedia_ATAId", "TestedMedia", "ATAId"); migrationBuilder.CreateIndex("IX_TestedMedia_CHSId", "TestedMedia", "CHSId"); migrationBuilder.CreateIndex("IX_TestedMedia_CurrentCHSId", "TestedMedia", "CurrentCHSId"); migrationBuilder.CreateIndex("IX_TestedMedia_MMCId", "TestedMedia", "MMCId"); migrationBuilder.CreateIndex("IX_TestedMedia_SCSIId", "TestedMedia", "SCSIId"); migrationBuilder.CreateIndex("IX_UshortClass_InquiryId", "UshortClass", "InquiryId"); migrationBuilder.CreateIndex("IX_WriteDescriptor_Mode2AId", "WriteDescriptor", "Mode2AId"); migrationBuilder.AddForeignKey("FK_Device_ATA_ATAId", "Device", "ATAId", "ATA", principalColumn: "Id", onDelete: ReferentialAction.Restrict); migrationBuilder.AddForeignKey("FK_Device_ATA_ATAPIId", "Device", "ATAPIId", "ATA", principalColumn: "Id", onDelete: ReferentialAction.Restrict); migrationBuilder.AddForeignKey("FK_Device_SCSI_SCSIId", "Device", "SCSIId", "SCSI", principalColumn: "Id", onDelete: ReferentialAction.Restrict); migrationBuilder.AddForeignKey("FK_TestedMedia_ATA_ATAId", "TestedMedia", "ATAId", "ATA", principalColumn: "Id", onDelete: ReferentialAction.Restrict); migrationBuilder.AddForeignKey("FK_TestedMedia_SCSI_SCSIId", "TestedMedia", "SCSIId", "SCSI", principalColumn: "Id", onDelete: ReferentialAction.Restrict); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey("FK_ATA_TestedMedia_ReadCapabilitiesId", "ATA"); migrationBuilder.DropForeignKey("FK_SCSI_TestedMedia_ReadCapabilitiesId", "SCSI"); migrationBuilder.DropTable("BlockDescriptor"); migrationBuilder.DropTable("Device"); migrationBuilder.DropTable("IntClass"); migrationBuilder.DropTable("ModePage"); migrationBuilder.DropTable("Page"); migrationBuilder.DropTable("StringClass"); migrationBuilder.DropTable("SupportedDensity"); migrationBuilder.DropTable("UshortClass"); migrationBuilder.DropTable("WriteDescriptor"); migrationBuilder.DropTable("FireWire"); migrationBuilder.DropTable("SecureDigital"); migrationBuilder.DropTable("USB"); migrationBuilder.DropTable("SupportedMedia"); migrationBuilder.DropTable("PCMCIA"); migrationBuilder.DropTable("SequentialMedia"); migrationBuilder.DropTable("TestedMedia"); migrationBuilder.DropTable("ATA"); migrationBuilder.DropTable("CHS"); migrationBuilder.DropTable("SCSI"); migrationBuilder.DropTable("Inquiry"); migrationBuilder.DropTable("Mode"); migrationBuilder.DropTable("MMC"); migrationBuilder.DropTable("SSC"); migrationBuilder.DropTable("Features"); migrationBuilder.DropTable("Mode2A"); } } }