mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Fix USB IDs and indexes in databases.
This commit is contained in:
29
DiscImageChef.Server/Migrations/201812241719441_FixUsbIdsAndIndexes.Designer.cs
generated
Normal file
29
DiscImageChef.Server/Migrations/201812241719441_FixUsbIdsAndIndexes.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 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"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
Reference in New Issue
Block a user