mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Allow setting several density codes with the same code.
This commit is contained in:
@@ -97,6 +97,8 @@
|
||||
<Compile Include="Migrations\20190102230036_AddOptimalReadMultipleCount.Designer.cs" />
|
||||
<Compile Include="Migrations\20190108013456_AddChangeableScsiModes.cs" />
|
||||
<Compile Include="Migrations\20190108013456_AddChangeableScsiModes.Designer.cs" />
|
||||
<Compile Include="Migrations\20190525183723_IdForDensityCode.cs" />
|
||||
<Compile Include="Migrations\20190525183723_IdForDensityCode.Designer.cs" />
|
||||
<Compile Include="Migrations\DicContextModelSnapshot.cs" />
|
||||
<Compile Include="Models\CdOffset.cs" />
|
||||
<Compile Include="Models\Command.cs" />
|
||||
|
||||
1571
DiscImageChef.Database/Migrations/20190525183723_IdForDensityCode.Designer.cs
generated
Normal file
1571
DiscImageChef.Database/Migrations/20190525183723_IdForDensityCode.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,56 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace DiscImageChef.Database.Migrations
|
||||
{
|
||||
public partial class IdForDensityCode : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
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
|
||||
.Sql("INSERT INTO DensityCode (Code, SscSupportedMediaId) SELECT Code, SscSupportedMediaId FROM DensityCode_old");
|
||||
|
||||
migrationBuilder.DropTable("DensityCode_old");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
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
|
||||
.Sql("INSERT INTO DensityCode (Code, SscSupportedMediaId) SELECT Code, SscSupportedMediaId FROM DensityCode_old");
|
||||
|
||||
migrationBuilder.DropTable("DensityCode_old");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace DiscImageChef.Database.Migrations
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "2.2.0-rtm-35687");
|
||||
modelBuilder.HasAnnotation("ProductVersion", "2.2.4-servicing-10062");
|
||||
|
||||
modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Ata", b =>
|
||||
{
|
||||
@@ -75,11 +75,13 @@ namespace DiscImageChef.Database.Migrations
|
||||
|
||||
modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.DensityCode", b =>
|
||||
{
|
||||
b.Property<int>("Code").ValueGeneratedOnAdd();
|
||||
b.Property<int>("Id").ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int>("Code");
|
||||
|
||||
b.Property<int?>("SscSupportedMediaId");
|
||||
|
||||
b.HasKey("Code");
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("SscSupportedMediaId");
|
||||
|
||||
|
||||
@@ -97,9 +97,8 @@
|
||||
<HintPath>..\packages\Microsoft.AspNet.TelemetryCorrelation.1.0.5\lib\net45\Microsoft.AspNet.TelemetryCorrelation.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="MimeKit, Version=2.1.0.0, Culture=neutral, PublicKeyToken=bede1c8a46c66814">
|
||||
@@ -273,6 +272,14 @@
|
||||
<Compile Include="Migrations\201901081359499_AddChangeableScsiModes.Designer.cs">
|
||||
<DependentUpon>201901081359499_AddChangeableScsiModes.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\201905252122267_IdForDensityCode.cs" />
|
||||
<Compile Include="Migrations\201905252122267_IdForDensityCode.Designer.cs">
|
||||
<DependentUpon>201905252122267_IdForDensityCode.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\201905252245072_MakeEntityFrameworkHappy.cs" />
|
||||
<Compile Include="Migrations\201905252245072_MakeEntityFrameworkHappy.Designer.cs">
|
||||
<DependentUpon>201905252245072_MakeEntityFrameworkHappy.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\Configuration.cs" />
|
||||
<Compile Include="Models\CdOffset.cs" />
|
||||
<Compile Include="Models\Command.cs" />
|
||||
@@ -427,6 +434,12 @@
|
||||
<EmbeddedResource Include="Migrations\201901081359499_AddChangeableScsiModes.resx">
|
||||
<DependentUpon>201901081359499_AddChangeableScsiModes.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\201905252122267_IdForDensityCode.resx">
|
||||
<DependentUpon>201905252122267_IdForDensityCode.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\201905252245072_MakeEntityFrameworkHappy.resx">
|
||||
<DependentUpon>201905252245072_MakeEntityFrameworkHappy.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
|
||||
29
DiscImageChef.Server/Migrations/201905252122267_IdForDensityCode.Designer.cs
generated
Normal file
29
DiscImageChef.Server/Migrations/201905252122267_IdForDensityCode.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 IdForDensityCode : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(IdForDensityCode));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201905252122267_IdForDensityCode"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
namespace DiscImageChef.Server.Migrations
|
||||
{
|
||||
public partial class IdForDensityCode : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
RenameTable("DensityCodes", "DensityCodes_old");
|
||||
|
||||
CreateTable("dbo.DensityCodes",
|
||||
c => new {Code = c.Int(false), SscSupportedMedia_Id = c.Int(), Id = c.Int(false, true)})
|
||||
.PrimaryKey(t => t.Id).ForeignKey("dbo.SscSupportedMedias", t => t.SscSupportedMedia_Id)
|
||||
.Index(t => t.SscSupportedMedia_Id);
|
||||
|
||||
Sql("INSERT INTO DensityCodes (Code, SscSupportedMedia_Id) SELECT Code, SscSupportedMedia_Id FROM DensityCodes_old");
|
||||
|
||||
DropTable("DensityCodes_old");
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
RenameTable("DensityCodes", "DensityCodes_old");
|
||||
|
||||
CreateTable("dbo.DensityCodes", c => new {Code = c.Int(false, true), SscSupportedMedia_Id = c.Int()})
|
||||
.PrimaryKey(t => t.Code).ForeignKey("dbo.SscSupportedMedias", t => t.SscSupportedMedia_Id)
|
||||
.Index(t => t.SscSupportedMedia_Id);
|
||||
|
||||
Sql("INSERT INTO DensityCodes (Code, SscSupportedMedia_Id) SELECT Code, SscSupportedMedia_Id FROM DensityCodes_old");
|
||||
|
||||
DropTable("DensityCodes_old");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
29
DiscImageChef.Server/Migrations/201905252245072_MakeEntityFrameworkHappy.Designer.cs
generated
Normal file
29
DiscImageChef.Server/Migrations/201905252245072_MakeEntityFrameworkHappy.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 MakeEntityFrameworkHappy : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(MakeEntityFrameworkHappy));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201905252245072_MakeEntityFrameworkHappy"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
namespace DiscImageChef.Server.Migrations
|
||||
{
|
||||
public partial class MakeEntityFrameworkHappy : DbMigration
|
||||
{
|
||||
public override void Up() { }
|
||||
|
||||
public override void Down() { }
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@
|
||||
</configSections>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc" />
|
||||
@@ -36,7 +36,7 @@
|
||||
<system.web>
|
||||
<compilation>
|
||||
<assemblies>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add assembly="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
For more information on how to configure your ASP.NET application, please visit
|
||||
https://go.microsoft.com/fwlink/?LinkId=301879
|
||||
@@ -9,16 +9,13 @@
|
||||
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</configSections>
|
||||
<connectionStrings>
|
||||
<add name="DicServerContext" connectionString="server=localhost;port=3306;database=discimagechef;uid=dic;password=dicpass"
|
||||
providerName="MySql.Data.MySqlClient" />
|
||||
<add name="DicServerContext" connectionString="server=localhost;port=3306;database=discimagechef;uid=dic;password=dicpass" providerName="MySql.Data.MySqlClient" />
|
||||
</connectionStrings>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
|
||||
<providers>
|
||||
<provider invariantName="MySql.Data.MySqlClient"
|
||||
type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework"/>
|
||||
<provider invariantName="System.Data.SqlClient"
|
||||
type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
|
||||
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework" />
|
||||
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
|
||||
</providers>
|
||||
</entityFramework> <appSettings>
|
||||
<add key="webpages:Version" value="3.0.0.0" />
|
||||
@@ -50,11 +47,11 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.1" newVersion="4.0.2.1" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.1" newVersion="4.0.3.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
|
||||
@@ -74,21 +71,28 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="1.0.0.0-5.2.4.0" newVersion="5.2.4.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.8.5.0" newVersion="1.8.5.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.7.0.0" newVersion="3.7.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
<system.data>
|
||||
<DbProviderFactories>
|
||||
<remove invariant="MySql.Data.MySqlClient" />
|
||||
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL"
|
||||
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=8.0.13.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
|
||||
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=8.0.13.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
|
||||
</DbProviderFactories>
|
||||
</system.data>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
|
||||
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user