43 lines
1.9 KiB
C#
43 lines
1.9 KiB
C#
namespace Weee.Migrations
|
|
{
|
|
using System;
|
|
using System.Data.Entity.Migrations;
|
|
|
|
public partial class add_OrganizationLCAFabSurveyForm_OtherCompounds_table : DbMigration
|
|
{
|
|
public override void Up()
|
|
{
|
|
CreateTable(
|
|
"dbo.OrganizationLCAFabSurveyForm_OtherCompounds",
|
|
c => new
|
|
{
|
|
ID = c.Int(nullable: false, identity: true),
|
|
ParameterID = c.Int(),
|
|
LCAID = c.Int(nullable: false),
|
|
ProcessName = c.String(),
|
|
ResponsibleUnit = c.String(),
|
|
Name = c.String(),
|
|
Scalar = c.Decimal(nullable: false, precision: 24, scale: 12),
|
|
KgCO2e = c.Decimal(nullable: false, precision: 24, scale: 12),
|
|
CreatedTime = c.DateTime(nullable: false, precision: 7, storeType: "datetime2"),
|
|
Description = c.String(),
|
|
})
|
|
.PrimaryKey(t => t.ID)
|
|
.ForeignKey("dbo.OrganizationLCA", t => t.LCAID)
|
|
.ForeignKey("dbo.NonYearlyParameters", t => t.ParameterID)
|
|
.Index(t => t.ParameterID)
|
|
.Index(t => t.LCAID);
|
|
|
|
}
|
|
|
|
public override void Down()
|
|
{
|
|
DropForeignKey("dbo.OrganizationLCAFabSurveyForm_OtherCompounds", "ParameterID", "dbo.NonYearlyParameters");
|
|
DropForeignKey("dbo.OrganizationLCAFabSurveyForm_OtherCompounds", "LCAID", "dbo.OrganizationLCA");
|
|
DropIndex("dbo.OrganizationLCAFabSurveyForm_OtherCompounds", new[] { "LCAID" });
|
|
DropIndex("dbo.OrganizationLCAFabSurveyForm_OtherCompounds", new[] { "ParameterID" });
|
|
DropTable("dbo.OrganizationLCAFabSurveyForm_OtherCompounds");
|
|
}
|
|
}
|
|
}
|