117 lines
5.5 KiB
C#
117 lines
5.5 KiB
C#
namespace Weee.Migrations
|
|
{
|
|
using System;
|
|
using System.Data.Entity.Migrations;
|
|
|
|
public partial class addUserAdminAccess : DbMigration
|
|
{
|
|
public override void Up()
|
|
{
|
|
CreateTable(
|
|
"dbo.AdminAccess",
|
|
c => new
|
|
{
|
|
ID = c.Int(nullable: false, identity: true),
|
|
oriEncryptJson = c.String(),
|
|
lastModifiedBy = c.String(nullable: false, maxLength: 128),
|
|
lastModifiedTime = c.DateTime(nullable: false),
|
|
functionScope = c.Int(nullable: false),
|
|
activeStartDate = c.DateTime(),
|
|
activeEndDate = c.DateTime(),
|
|
companyAdminLimit = c.Int(nullable: false),
|
|
companyAdminQuantity = c.Int(nullable: false),
|
|
lcaLimit = c.Int(nullable: false),
|
|
lcaQuantity = c.Int(nullable: false),
|
|
listReportLimit = c.Int(nullable: false),
|
|
listReportQuantity = c.Int(nullable: false),
|
|
certifyCompanyLimit = c.Int(nullable: false),
|
|
certifyCompanyQuantity = c.Int(nullable: false),
|
|
lcaUserLimit = c.Int(nullable: false),
|
|
lcaUserQuantity = c.Int(nullable: false),
|
|
supplierLimit = c.Int(nullable: false),
|
|
supplierQuantity = c.Int(nullable: false),
|
|
})
|
|
.PrimaryKey(t => t.ID);
|
|
CreateTable(
|
|
"dbo.AdminAccessHistory",
|
|
c => new
|
|
{
|
|
historyID = c.Int(nullable: false, identity: true),
|
|
ID = c.Int(),
|
|
oriEncryptJson = c.String(),
|
|
lastModifiedBy = c.String(nullable: false, maxLength: 128),
|
|
lastModifiedTime = c.DateTime(nullable: false),
|
|
functionScope = c.Int(nullable: false),
|
|
activeStartDate = c.DateTime(),
|
|
activeEndDate = c.DateTime(),
|
|
companyAdminLimit = c.Int(nullable: false),
|
|
companyAdminQuantity = c.Int(nullable: false),
|
|
lcaLimit = c.Int(nullable: false),
|
|
lcaQuantity = c.Int(nullable: false),
|
|
listReportLimit = c.Int(nullable: false),
|
|
listReportQuantity = c.Int(nullable: false),
|
|
certifyCompanyLimit = c.Int(nullable: false),
|
|
certifyCompanyQuantity = c.Int(nullable: false),
|
|
lcaUserLimit = c.Int(nullable: false),
|
|
lcaUserQuantity = c.Int(nullable: false),
|
|
supplierLimit = c.Int(nullable: false),
|
|
supplierQuantity = c.Int(nullable: false),
|
|
})
|
|
.PrimaryKey(t => t.historyID);
|
|
|
|
CreateTable(
|
|
"dbo.UserAccountAccess",
|
|
c => new
|
|
{
|
|
ID = c.Int(nullable: false, identity: true),
|
|
UserId = c.String(nullable: false, maxLength: 128),
|
|
lastModifiedBy = c.String(nullable: false, maxLength: 128),
|
|
lastModifiedTime = c.DateTime(nullable: false),
|
|
lcaLimit = c.Int(nullable: false),
|
|
allow3456 = c.Boolean(nullable: false),
|
|
supplierAccountLimit = c.Int(nullable: false),
|
|
fabLimit = c.Int(nullable: false),
|
|
allowMergeReport = c.Boolean(nullable: false),
|
|
functionScope = c.Int(nullable: false),
|
|
activeStartDate = c.DateTime(),
|
|
activeEndDate = c.DateTime(),
|
|
listReportLimit = c.Int(nullable: false),
|
|
lcaUserLimit = c.Int(nullable: false),
|
|
supplierLimit = c.Int(nullable: false),
|
|
})
|
|
.PrimaryKey(t => t.ID);
|
|
|
|
CreateIndex("dbo.UserAccountAccess", "UserId", name: "IX_UserId");
|
|
CreateIndex("dbo.UserAccountTypes", "UserId", name: "IX_UserId");
|
|
CreateTable(
|
|
"dbo.UserAccountAccessHistory",
|
|
c => new
|
|
{
|
|
historyID = c.Int(nullable: false, identity: true),
|
|
ID = c.Int(),
|
|
UserId = c.String(nullable: false, maxLength: 128),
|
|
lastModifiedBy = c.String(nullable: false, maxLength: 128),
|
|
lastModifiedTime = c.DateTime(nullable: false),
|
|
lcaLimit = c.Int(nullable: false),
|
|
allow3456 = c.Boolean(nullable: false),
|
|
supplierAccountLimit = c.Int(nullable: false),
|
|
fabLimit = c.Int(nullable: false),
|
|
allowMergeReport = c.Boolean(nullable: false),
|
|
functionScope = c.Int(nullable: false),
|
|
activeStartDate = c.DateTime(),
|
|
activeEndDate = c.DateTime(),
|
|
listReportLimit = c.Int(nullable: false),
|
|
lcaUserLimit = c.Int(nullable: false),
|
|
supplierLimit = c.Int(nullable: false),
|
|
})
|
|
.PrimaryKey(t => t.historyID);
|
|
}
|
|
|
|
public override void Down()
|
|
{
|
|
DropTable("dbo.UserAccountAccess");
|
|
DropTable("dbo.AdminAccesses");
|
|
}
|
|
}
|
|
}
|