mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Store CompactDisc read offsets in database.
This commit is contained in:
29
DiscImageChef.Server/Migrations/201812250223002_AddCdOffsets.Designer.cs
generated
Normal file
29
DiscImageChef.Server/Migrations/201812250223002_AddCdOffsets.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 AddCdOffsets : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(AddCdOffsets));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201812250223002_AddCdOffsets"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
namespace DiscImageChef.Server.Migrations
|
||||
{
|
||||
public partial class AddCdOffsets : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
CreateTable("dbo.CompactDiscOffsets",
|
||||
c => new
|
||||
{
|
||||
Id = c.Int(false, true),
|
||||
AddedWhen = c.DateTime(false, 0),
|
||||
ModifiedWhen = c.DateTime(false, 0),
|
||||
Manufacturer = c.String(unicode: false),
|
||||
Model = c.String(unicode: false),
|
||||
Offset = c.Short(false),
|
||||
Submissions = c.Int(false),
|
||||
Agreement = c.Single(false)
|
||||
}).PrimaryKey(t => t.Id).Index(t => t.ModifiedWhen);
|
||||
|
||||
AddColumn("dbo.Devices", "ModifiedWhen", c => c.DateTime(precision: 0));
|
||||
AddColumn("dbo.Devices", "CdOffset_Id", c => c.Int());
|
||||
CreateIndex("dbo.Devices", "ModifiedWhen");
|
||||
CreateIndex("dbo.Devices", "CdOffset_Id");
|
||||
AddForeignKey("dbo.Devices", "CdOffset_Id", "dbo.CompactDiscOffsets", "Id");
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropForeignKey("dbo.Devices", "CdOffset_Id", "dbo.CompactDiscOffsets");
|
||||
DropIndex("dbo.Devices", new[] {"CdOffset_Id"});
|
||||
DropIndex("dbo.Devices", new[] {"ModifiedWhen"});
|
||||
DropIndex("dbo.CompactDiscOffsets", new[] {"ModifiedWhen"});
|
||||
DropColumn("dbo.Devices", "CdOffset_Id");
|
||||
DropColumn("dbo.Devices", "ModifiedWhen");
|
||||
DropTable("dbo.CompactDiscOffsets");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user