demo20230512/Migrations/202211150338145_updateUserAdminAccess.cs

109 lines
5.6 KiB
C#
Raw Permalink Normal View History

2023-05-12 10:20:28 +08:00
namespace Weee.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class updateUserAdminAccess : DbMigration
{
public override void Up()
{
DropTable("dbo.AdminAccessHistory");
CreateTable(
"dbo.AdminAccessHistory",
c => new
{
historyID = c.Int(nullable: false, identity: true),
ID = c.Int(nullable: false),
encryptedJson = c.String(),
encJsonAppliedBy = c.String(),
encJsonAppliedtime = c.DateTime(nullable: false),
functionScope = c.Int(nullable: false),
activeStartDate = c.DateTime(),
activeEndDate = c.DateTime(),
companyAdminLimit = c.Int(nullable: false),
lcaLimit = c.Int(nullable: false),
listReportLimit = c.Int(nullable: false),
certifyCompanyLimit = c.Int(nullable: false),
lcaUserLimit = c.Int(nullable: false),
supplierLimit = c.Int(nullable: false),
})
.PrimaryKey(t => t.historyID);
CreateTable(
"dbo.AdminAccessUsage",
c => new
{
ID = c.Int(nullable: false, identity: true),
lastModifiedtime = c.DateTime(nullable: false),
companyAdminQuantity = c.Int(nullable: false),
lcaQuantity = c.Int(nullable: false),
listReportQuantity = c.Int(nullable: false),
certifyCompanyQuantity = c.Int(nullable: false),
lcaUserQuantity = c.Int(nullable: false),
supplierQuantity = c.Int(nullable: false),
})
.PrimaryKey(t => t.ID);
DropTable("dbo.UserAccountAccessHistory");
CreateTable(
"dbo.UserAccountAccessHistory",
c => new
{
historyID = c.Int(nullable: false, identity: true),
ID = c.Int(nullable: false),
UserId = c.String(),
lastModifiedBy = c.String(),
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);
AddColumn("dbo.AdminAccess", "encryptedJson", c => c.String());
AddColumn("dbo.AdminAccess", "encJsonAppliedBy", c => c.String());
AddColumn("dbo.AdminAccess", "encJsonAppliedtime", c => c.DateTime(nullable: false));
DropColumn("dbo.AdminAccess", "oriEncryptJson");
DropColumn("dbo.AdminAccess", "lastModifiedBy");
DropColumn("dbo.AdminAccess", "lastModifiedTime");
DropColumn("dbo.AdminAccess", "companyAdminQuantity");
DropColumn("dbo.AdminAccess", "lcaQuantity");
DropColumn("dbo.AdminAccess", "listReportQuantity");
DropColumn("dbo.AdminAccess", "certifyCompanyQuantity");
DropColumn("dbo.AdminAccess", "lcaUserQuantity");
DropColumn("dbo.AdminAccess", "supplierQuantity");
}
public override void Down()
{
AddColumn("dbo.UserAccountAccess", "Discriminator", c => c.String(nullable: false, maxLength: 128));
AddColumn("dbo.UserAccountAccess", "historyID", c => c.Int());
AddColumn("dbo.AdminAccess", "Discriminator", c => c.String(nullable: false, maxLength: 128));
AddColumn("dbo.AdminAccess", "historyID", c => c.Int());
AddColumn("dbo.AdminAccess", "supplierQuantity", c => c.Int(nullable: false));
AddColumn("dbo.AdminAccess", "lcaUserQuantity", c => c.Int(nullable: false));
AddColumn("dbo.AdminAccess", "certifyCompanyQuantity", c => c.Int(nullable: false));
AddColumn("dbo.AdminAccess", "listReportQuantity", c => c.Int(nullable: false));
AddColumn("dbo.AdminAccess", "lcaQuantity", c => c.Int(nullable: false));
AddColumn("dbo.AdminAccess", "companyAdminQuantity", c => c.Int(nullable: false));
AddColumn("dbo.AdminAccess", "lastModifiedTime", c => c.DateTime(nullable: false));
AddColumn("dbo.AdminAccess", "lastModifiedBy", c => c.String());
AddColumn("dbo.AdminAccess", "oriEncryptJson", c => c.String());
DropColumn("dbo.AdminAccess", "encJsonAppliedtime");
DropColumn("dbo.AdminAccess", "encJsonAppliedBy");
DropColumn("dbo.AdminAccess", "encryptedJson");
DropTable("dbo.UserAccountAccessHistory");
DropTable("dbo.AdminAccessUsage");
DropTable("dbo.AdminAccessHistory");
}
}
}