mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
21 lines
669 B
C#
21 lines
669 B
C#
|
|
using System.Data.Entity.Migrations;
|
||
|
|
|
||
|
|
namespace DiscImageChef.Server.Migrations
|
||
|
|
{
|
||
|
|
public partial class LinkDeviceStatsToReport : DbMigration
|
||
|
|
{
|
||
|
|
public override void Up()
|
||
|
|
{
|
||
|
|
AddColumn("dbo.DeviceStats", "Report_Id", c => c.Int());
|
||
|
|
CreateIndex("dbo.DeviceStats", "Report_Id");
|
||
|
|
AddForeignKey("dbo.DeviceStats", "Report_Id", "dbo.Devices", "Id");
|
||
|
|
}
|
||
|
|
|
||
|
|
public override void Down()
|
||
|
|
{
|
||
|
|
DropForeignKey("dbo.DeviceStats", "Report_Id", "dbo.Devices");
|
||
|
|
DropIndex("dbo.DeviceStats", new[] {"Report_Id"});
|
||
|
|
DropColumn("dbo.DeviceStats", "Report_Id");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|