mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Link device with reports in server database.
This commit is contained in:
3
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
3
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
@@ -1795,6 +1795,9 @@
|
|||||||
<e p="201812220029427_AddStatistics.Designer.cs" t="Include" />
|
<e p="201812220029427_AddStatistics.Designer.cs" t="Include" />
|
||||||
<e p="201812220029427_AddStatistics.cs" t="Include" />
|
<e p="201812220029427_AddStatistics.cs" t="Include" />
|
||||||
<e p="201812220029427_AddStatistics.resx" t="Include" />
|
<e p="201812220029427_AddStatistics.resx" t="Include" />
|
||||||
|
<e p="201812221606592_LinkDeviceStatsToReport.Designer.cs" t="Include" />
|
||||||
|
<e p="201812221606592_LinkDeviceStatsToReport.cs" t="Include" />
|
||||||
|
<e p="201812221606592_LinkDeviceStatsToReport.resx" t="Include" />
|
||||||
<e p="Configuration.cs" t="Include" />
|
<e p="Configuration.cs" t="Include" />
|
||||||
</e>
|
</e>
|
||||||
<e p="Models" t="Include">
|
<e p="Models" t="Include">
|
||||||
|
|||||||
@@ -205,6 +205,10 @@
|
|||||||
<Compile Include="Migrations\201812220029427_AddStatistics.Designer.cs">
|
<Compile Include="Migrations\201812220029427_AddStatistics.Designer.cs">
|
||||||
<DependentUpon>201812220029427_AddStatistics.cs</DependentUpon>
|
<DependentUpon>201812220029427_AddStatistics.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Migrations\201812221606592_LinkDeviceStatsToReport.cs" />
|
||||||
|
<Compile Include="Migrations\201812221606592_LinkDeviceStatsToReport.Designer.cs">
|
||||||
|
<DependentUpon>201812221606592_LinkDeviceStatsToReport.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Migrations\Configuration.cs" />
|
<Compile Include="Migrations\Configuration.cs" />
|
||||||
<Compile Include="Models\Command.cs" />
|
<Compile Include="Models\Command.cs" />
|
||||||
<Compile Include="Models\Context.cs" />
|
<Compile Include="Models\Context.cs" />
|
||||||
@@ -291,6 +295,9 @@
|
|||||||
<EmbeddedResource Include="Migrations\201812220029427_AddStatistics.resx">
|
<EmbeddedResource Include="Migrations\201812220029427_AddStatistics.resx">
|
||||||
<DependentUpon>201812220029427_AddStatistics.cs</DependentUpon>
|
<DependentUpon>201812220029427_AddStatistics.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Migrations\201812221606592_LinkDeviceStatsToReport.resx">
|
||||||
|
<DependentUpon>201812221606592_LinkDeviceStatsToReport.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||||
|
|||||||
29
DiscImageChef.Server/Migrations/201812221606592_LinkDeviceStatsToReport.Designer.cs
generated
Normal file
29
DiscImageChef.Server/Migrations/201812221606592_LinkDeviceStatsToReport.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 LinkDeviceStatsToReport : IMigrationMetadata
|
||||||
|
{
|
||||||
|
private readonly ResourceManager Resources = new ResourceManager(typeof(LinkDeviceStatsToReport));
|
||||||
|
|
||||||
|
string IMigrationMetadata.Id
|
||||||
|
{
|
||||||
|
get { return "201812221606592_LinkDeviceStatsToReport"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Source
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Target
|
||||||
|
{
|
||||||
|
get { return Resources.GetString("Target"); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -7,7 +7,7 @@ namespace DiscImageChef.Server.Migrations
|
|||||||
{
|
{
|
||||||
public Configuration()
|
public Configuration()
|
||||||
{
|
{
|
||||||
AutomaticMigrationsEnabled = true;
|
AutomaticMigrationsEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Seed(DicServerContext context)
|
protected override void Seed(DicServerContext context)
|
||||||
|
|||||||
@@ -10,5 +10,6 @@ namespace DiscImageChef.Server.Models
|
|||||||
public string Model { get; set; }
|
public string Model { get; set; }
|
||||||
public string Revision { get; set; }
|
public string Revision { get; set; }
|
||||||
public string Bus { get; set; }
|
public string Bus { get; set; }
|
||||||
|
public virtual Device Report { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user