demo20230512/Migrations/202211230828384_tmpDropWrongNameTables.cs

125 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 tmpDropWrongNameTables : DbMigration
{
public override void Up()
{
DropTable("dbo.AdminAccess");
DropTable("dbo.AdminAccessHistory");
DropTable("dbo.AdminAccessUsage");
DropTable("dbo.UserAccountAccess");
DropTable("dbo.UserAccountAccessHistory");
}
public override void Down()
{
CreateTable(
"dbo.UserAccountAccessHistories",
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);
CreateTable(
"dbo.UserAccountAccesses",
c => new
{
ID = c.Int(nullable: false, identity: true),
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.ID);
CreateTable(
"dbo.AdminAccessUsages",
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);
CreateTable(
"dbo.AdminAccessHistories",
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),
rowHash = c.String(),
})
.PrimaryKey(t => t.historyID);
CreateTable(
"dbo.AdminAccesses",
c => new
{
ID = c.Int(nullable: false, identity: true),
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),
rowHash = c.String(),
})
.PrimaryKey(t => t.ID);
}
}
}