52 lines
2.4 KiB
C#
52 lines
2.4 KiB
C#
namespace Weee.Migrations
|
|
{
|
|
using System;
|
|
using System.Data.Entity.Migrations;
|
|
|
|
public partial class addTable4AR456 : DbMigration
|
|
{
|
|
public override void Up()
|
|
{
|
|
CreateTable(
|
|
"dbo.AssessmentReportGWP",
|
|
c => new
|
|
{
|
|
ID = c.Int(nullable: false, identity: true),
|
|
ARversionGuid = c.Guid(nullable: false),
|
|
ingredientName = c.String(unicode: false, nullable: false, maxLength: 200),
|
|
chemicalFormula = c.String(unicode: false, nullable: true, maxLength: 200),
|
|
GWP100 = c.Decimal(nullable: false, precision: 24, scale: 12, defaultValue:0),
|
|
ChineseName = c.String(unicode: true, nullable: true, maxLength: 200),
|
|
Alias = c.String(unicode: true, nullable: true, maxLength: 200),
|
|
IPCCcode = c.String(unicode: false, nullable: true, maxLength: 20),
|
|
createTime = c.DateTime(nullable: false, defaultValueSql: "getdate()"),
|
|
createBy = c.String(unicode:false, nullable:true, maxLength:20),
|
|
modifyTime = c.DateTime(nullable: false, defaultValueSql: "getdate()"),
|
|
modifyBy = c.String(unicode: false, nullable: true, maxLength: 20),
|
|
})
|
|
.PrimaryKey(t => t.ID);
|
|
|
|
CreateIndex("dbo.AssessmentReportGWP", "ARversionGuid", name: "IX_ARversionGuid");
|
|
CreateTable(
|
|
"dbo.AssessmentReportVersion",
|
|
c => new
|
|
{
|
|
ARversionGuid = c.Guid(nullable: false),
|
|
ARversion = c.String(unicode: false, nullable: false, maxLength: 20),
|
|
createTime = c.DateTime(nullable: false, defaultValueSql:"getdate()"),
|
|
createBy = c.String(unicode: false, nullable: true, maxLength: 20),
|
|
})
|
|
.PrimaryKey(t => t.ARversionGuid);
|
|
|
|
AddColumn("dbo.LCAs", "ARversion", c => c.String(unicode: false, nullable: true, maxLength: 20));
|
|
}
|
|
|
|
public override void Down()
|
|
{
|
|
DropColumn("dbo.LCAs", "ARversion");
|
|
DropTable("dbo.AssessmentReportVersion");
|
|
DropTable("dbo.AssessmentReportGWP");
|
|
}
|
|
}
|
|
}
|