Fix USB IDs and indexes in databases.

This commit is contained in:
2018-12-24 21:13:02 +00:00
parent 383794bace
commit 5a0714e795
13 changed files with 1673 additions and 24 deletions

View 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 FixUsbIdsAndIndexes : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(FixUsbIdsAndIndexes));
string IMigrationMetadata.Id
{
get { return "201812241719441_FixUsbIdsAndIndexes"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -0,0 +1,25 @@
using System.Data.Entity.Migrations;
namespace DiscImageChef.Server.Migrations
{
public partial class FixUsbIdsAndIndexes : DbMigration
{
public override void Up()
{
AddColumn("dbo.UsbVendors", "VendorId", c => c.Int(false));
CreateIndex("dbo.UsbProducts", "ProductId");
CreateIndex("dbo.UsbProducts", "ModifiedWhen");
CreateIndex("dbo.UsbVendors", "VendorId", true);
CreateIndex("dbo.UsbVendors", "ModifiedWhen");
}
public override void Down()
{
DropIndex("dbo.UsbVendors", new[] {"ModifiedWhen"});
DropIndex("dbo.UsbVendors", new[] {"VendorId"});
DropIndex("dbo.UsbProducts", new[] {"ModifiedWhen"});
DropIndex("dbo.UsbProducts", new[] {"ProductId"});
DropColumn("dbo.UsbVendors", "VendorId");
}
}
}

File diff suppressed because one or more lines are too long