| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139 |
- namespace WeApp.Migrations
- {
- using System;
- using System.Collections.Generic;
- using System.Data.Entity.Infrastructure.Annotations;
- using System.Data.Entity.Migrations;
-
- public partial class InitCreate : DbMigration
- {
- public override void Up()
- {
- CreateTable(
- "dbo.Train_BehaviorTags",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- TagNo = c.String(maxLength: 20),
- TagName = c.String(maxLength: 50),
- CampNo = c.String(maxLength: 128),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Train_Camps", t => t.CampNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .Index(t => t.CampNo)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Train_Camps",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- Name = c.String(maxLength: 50),
- PackageNo = c.String(maxLength: 20),
- PackageName = c.String(maxLength: 50),
- EngineModelType = c.Int(nullable: false),
- CampState = c.Int(nullable: false),
- AssessRoleNos = c.String(maxLength: 500),
- AssessAuto = c.Boolean(nullable: false),
- RoundScore = c.Decimal(nullable: false, precision: 18, scale: 2),
- Variable = c.String(maxLength: 1000),
- ScoreRule = c.String(maxLength: 100),
- PlanDate = c.DateTime(nullable: false),
- StartDate = c.DateTime(),
- EngDate = c.DateTime(),
- TrainingMinute = c.Decimal(nullable: false, precision: 18, scale: 2),
- Description = c.String(maxLength: 500),
- EvalBehaviorTags = c.String(maxLength: 500),
- Remark = c.String(maxLength: 500),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_CampInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_Users",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- NormalizedUserName = c.String(nullable: false, maxLength: 256),
- NormalizedEmailAddress = c.String(nullable: false, maxLength: 256),
- ConcurrencyStamp = c.String(maxLength: 128),
- AuthenticationSource = c.String(maxLength: 64),
- UserName = c.String(nullable: false, maxLength: 256),
- UserType = c.Int(nullable: false),
- AccountType = c.Int(),
- AccountNo = c.String(maxLength: 100),
- ImagePath = c.String(maxLength: 1000),
- TenantId = c.Int(),
- EmailAddress = c.String(nullable: false, maxLength: 256),
- Name = c.String(nullable: false, maxLength: 64),
- Surname = c.String(maxLength: 64),
- AvatarImagePath = c.String(maxLength: 500),
- Password = c.String(nullable: false, maxLength: 128),
- EmailConfirmationCode = c.String(maxLength: 328),
- PasswordResetCode = c.String(maxLength: 328),
- LockoutEndDateUtc = c.DateTime(),
- AccessFailedCount = c.Int(nullable: false),
- IsLockoutEnabled = c.Boolean(nullable: false),
- PhoneNumber = c.String(maxLength: 32),
- IsPhoneNumberConfirmed = c.Boolean(nullable: false),
- SecurityStamp = c.String(maxLength: 128),
- IsTwoFactorEnabled = c.Boolean(nullable: false),
- IsEmailConfirmed = c.Boolean(nullable: false),
- IsActive = c.Boolean(nullable: false),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_User_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_User_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.UserName)
- .Index(t => t.UserType)
- .Index(t => t.AccountType)
- .Index(t => t.TenantId)
- .Index(t => t.EmailAddress)
- .Index(t => t.PhoneNumber)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_UserClaims",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- UserId = c.Long(nullable: false),
- ClaimType = c.String(maxLength: 256),
- ClaimValue = c.String(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserClaim_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.UserId)
- .Index(t => t.TenantId)
- .Index(t => t.UserId);
-
- CreateTable(
- "dbo.Sys_UserLogins",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- UserId = c.Long(nullable: false),
- LoginProvider = c.String(nullable: false, maxLength: 128),
- ProviderKey = c.String(nullable: false, maxLength: 256),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserLogin_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.UserId)
- .Index(t => t.TenantId)
- .Index(t => t.UserId);
-
- CreateTable(
- "dbo.Sys_UserRoles",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- UserId = c.Long(nullable: false),
- RoleId = c.Int(nullable: false),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserRole_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.UserId)
- .Index(t => t.TenantId)
- .Index(t => t.UserId);
-
- CreateTable(
- "dbo.Sys_Settings",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- UserId = c.Long(),
- Name = c.String(nullable: false, maxLength: 256),
- Value = c.String(),
- DisplayName = c.String(maxLength: 50),
- Type = c.Int(),
- Description = c.String(maxLength: 500),
- Remark = c.String(maxLength: 500),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.UserId)
- .Index(t => new { t.TenantId, t.Name, t.UserId }, unique: true);
-
- CreateTable(
- "dbo.Train_CampGroups",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- Name = c.String(maxLength: 50),
- CampNo = c.String(maxLength: 128),
- CampGroupState = c.Int(nullable: false),
- StartDate = c.DateTime(),
- EngDate = c.DateTime(),
- TrainingMinute = c.Decimal(nullable: false, precision: 18, scale: 2),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_CampGroupInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Train_Camps", t => t.CampNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.CampNo)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Train_CampRoleGroups",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- RoleGroupNo = c.String(maxLength: 128),
- CampNo = c.String(maxLength: 128),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Train_Camps", t => t.CampNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Bs_TrainingRoleGroups", t => t.RoleGroupNo)
- .Index(t => t.RoleGroupNo)
- .Index(t => t.CampNo)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Bs_TrainingRoleGroups",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- RoleGroupName = c.String(),
- Roles = c.String(),
- Description = c.String(),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_TrainingRoleGroupInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Train_CampSceneMaps",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- SceneNo = c.String(),
- SceneName = c.String(),
- AttachNos = c.String(),
- CampNo = c.String(maxLength: 128),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Train_Camps", t => t.CampNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .Index(t => t.CampNo)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_Permissions",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- Name = c.String(nullable: false, maxLength: 500),
- Master = c.Int(),
- MasterValue = c.String(maxLength: 100),
- Access = c.Int(),
- AccessValue = c.String(maxLength: 500),
- IsGranted = c.Boolean(nullable: false),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- UserId = c.Long(),
- Discriminator = c.String(nullable: false, maxLength: 128),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_DataPermission_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_PermissionSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_RolePermissionSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_UserPermissionSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.TenantId);
-
- CreateTable(
- "dbo.Train_CampGroupLogs",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- CampNo = c.String(maxLength: 128),
- GroupNo = c.String(maxLength: 128),
- RoundIndex = c.Int(nullable: false),
- LogType = c.Int(nullable: false),
- LogCommand = c.String(maxLength: 30),
- LogMessage = c.String(maxLength: 500),
- RoleNo = c.String(maxLength: 20),
- RoleName = c.String(maxLength: 50),
- LogState = c.Int(nullable: false),
- LogScore = c.Decimal(nullable: false, precision: 18, scale: 2),
- ParentNo = c.String(maxLength: 128),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Train_CampGroups", t => t.GroupNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .Index(t => t.GroupNo)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Train_CampGroupScores",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- CampNo = c.String(maxLength: 128),
- GroupNo = c.String(maxLength: 128),
- RoundIndex = c.Int(nullable: false),
- SystemScore = c.Decimal(nullable: false, precision: 18, scale: 2),
- CorrectionScore = c.Decimal(nullable: false, precision: 18, scale: 2),
- SpecialistScore = c.Decimal(nullable: false, precision: 18, scale: 2),
- AudienceScore = c.Decimal(nullable: false, precision: 18, scale: 2),
- ReferenceScore = c.Decimal(nullable: false, precision: 18, scale: 2),
- FinalTotalScore = c.Decimal(nullable: false, precision: 18, scale: 2),
- BehaviorTagScoreInfo = c.String(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Train_CampGroups", t => t.GroupNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .Index(t => t.GroupNo)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_Notifications",
- c => new
- {
- Id = c.Guid(nullable: false),
- NotificationName = c.String(nullable: false, maxLength: 96),
- Data = c.String(),
- DataTypeName = c.String(maxLength: 512),
- EntityTypeName = c.String(maxLength: 250),
- EntityTypeAssemblyQualifiedName = c.String(maxLength: 512),
- EntityId = c.String(maxLength: 96),
- Severity = c.Byte(nullable: false),
- UserIds = c.String(),
- ExcludedUserIds = c.String(),
- TenantIds = c.String(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id);
-
- CreateTable(
- "dbo.Sys_NotificationSubscriptions",
- c => new
- {
- Id = c.Guid(nullable: false),
- TenantId = c.Int(),
- UserId = c.Long(nullable: false),
- NotificationName = c.String(maxLength: 96),
- EntityTypeName = c.String(maxLength: 250),
- EntityTypeAssemblyQualifiedName = c.String(maxLength: 512),
- EntityId = c.String(maxLength: 96),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_NotificationSubscriptionInfo_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.TenantId)
- .Index(t => new { t.NotificationName, t.EntityTypeName, t.EntityId, t.UserId });
-
- CreateTable(
- "dbo.Sys_Roles",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- Description = c.String(),
- NormalizedName = c.String(nullable: false, maxLength: 32),
- ConcurrencyStamp = c.String(maxLength: 128),
- TenantId = c.Int(),
- Name = c.String(nullable: false, maxLength: 32),
- RoleType = c.Int(nullable: false),
- AccountType = c.Int(),
- DisplayName = c.String(nullable: false, maxLength: 64),
- IsStatic = c.Boolean(nullable: false),
- IsDefault = c.Boolean(nullable: false),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_Role_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_Role_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.TenantId)
- .Index(t => t.Name)
- .Index(t => t.RoleType)
- .Index(t => t.AccountType)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_RoleClaims",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- RoleId = c.Int(nullable: false),
- ClaimType = c.String(maxLength: 256),
- ClaimValue = c.String(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_RoleClaim_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Roles", t => t.RoleId)
- .Index(t => t.TenantId)
- .Index(t => t.RoleId);
-
- CreateTable(
- "dbo.Sys_AppGuids",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- Step = c.Short(nullable: false),
- LastId = c.Int(nullable: false),
- IdType = c.Short(nullable: false),
- LastUseDate = c.DateTime(),
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.IdType);
-
- CreateTable(
- "dbo.Sys_AttachFiles",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- AttachNo = c.String(maxLength: 32),
- TableName = c.String(maxLength: 50),
- ColumnName = c.String(maxLength: 50),
- SourceKey = c.String(maxLength: 50),
- FileTitle = c.String(maxLength: 50),
- FileName = c.String(maxLength: 50),
- FilePath = c.String(maxLength: 500),
- FileType = c.String(maxLength: 20),
- FileExt = c.String(maxLength: 10),
- Description = c.String(maxLength: 500),
- TenantId = c.Int(nullable: false),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysAttachFile_MustHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_SysAttachFile_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.TenantId)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_Functions",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- FunctionNo = c.String(maxLength: 100),
- ParentNo = c.String(maxLength: 100),
- FunctionName = c.String(maxLength: 100),
- PermissionName = c.String(maxLength: 500),
- FunctionType = c.Int(nullable: false),
- Action = c.String(maxLength: 50),
- Controller = c.String(maxLength: 50),
- Url = c.String(),
- Icon = c.String(maxLength: 50),
- Class = c.String(maxLength: 100),
- Script = c.String(),
- NeedAuth = c.Boolean(nullable: false),
- Sort = c.Int(nullable: false),
- Depth = c.Int(nullable: false),
- IsLeaf = c.Boolean(),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysFunction_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.FunctionNo)
- .Index(t => t.PermissionName, unique: true)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_SysHelps",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- Classification = c.String(maxLength: 40),
- HelpTitle = c.String(nullable: false, maxLength: 50),
- HelpKeyWords = c.String(maxLength: 50),
- HelpContent = c.String(),
- FunctionNo = c.String(maxLength: 100),
- PermissionName = c.String(maxLength: 500),
- Sequence = c.Int(nullable: false),
- Description = c.String(),
- Remark = c.String(maxLength: 1000),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysHelp_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_AuditLogs",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(nullable: false),
- UserId = c.Long(),
- UserName = c.String(),
- ServiceName = c.String(maxLength: 256),
- ServiceNameLang = c.String(),
- MethodName = c.String(maxLength: 256),
- MethodNameLang = c.String(),
- Parameters = c.String(maxLength: 1024),
- ExecutionTime = c.DateTime(nullable: false),
- ExecutionDuration = c.Int(nullable: false),
- ClientIpAddress = c.String(maxLength: 64),
- ClientName = c.String(maxLength: 128),
- BrowserInfo = c.String(maxLength: 512),
- Exception = c.String(maxLength: 2000),
- ImpersonatorUserId = c.Long(),
- ImpersonatorTenantId = c.Int(),
- CustomData = c.String(maxLength: 2000),
- LogType = c.Int(nullable: false),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysLog_MustHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.TenantId)
- .Index(t => t.UserId);
-
- CreateTable(
- "dbo.Sys_States",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- StateNo = c.String(maxLength: 32),
- StateName = c.String(maxLength: 50),
- TableName = c.String(nullable: false, maxLength: 50),
- ColumnName = c.String(nullable: false, maxLength: 50),
- CodeValue = c.String(nullable: false, maxLength: 100),
- DisplayValue = c.String(nullable: false, maxLength: 100),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysState_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Bs_TempInfos",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- TableName = c.String(maxLength: 50),
- ColumnName = c.String(maxLength: 50),
- Key = c.String(maxLength: 50),
- Value1 = c.String(maxLength: 100),
- Value2 = c.String(maxLength: 200),
- Value3 = c.String(maxLength: 500),
- Value5 = c.String(maxLength: 500),
- Value6 = c.String(maxLength: 500),
- Value7 = c.String(maxLength: 500),
- Value8 = c.String(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_NotificationTenants",
- c => new
- {
- Id = c.Guid(nullable: false),
- TenantId = c.Int(),
- NotificationName = c.String(nullable: false, maxLength: 96),
- Data = c.String(),
- DataTypeName = c.String(maxLength: 512),
- EntityTypeName = c.String(maxLength: 250),
- EntityTypeAssemblyQualifiedName = c.String(maxLength: 512),
- EntityId = c.String(maxLength: 96),
- Severity = c.Byte(nullable: false),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_TenantNotificationInfo_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.TenantId);
-
- CreateTable(
- "dbo.Sys_Tenants",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- TenancyName = c.String(nullable: false, maxLength: 64),
- Name = c.String(nullable: false, maxLength: 128),
- ConnectionString = c.String(maxLength: 1024),
- IsActive = c.Boolean(nullable: false),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_Tenant_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Bs_TrainingRoles",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- RoleName = c.String(maxLength: 50),
- Description = c.String(maxLength: 200),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_TrainingRoleInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_UserAccounts",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- UserId = c.Long(nullable: false),
- UserLinkId = c.Long(),
- UserName = c.String(maxLength: 256),
- EmailAddress = c.String(maxLength: 256),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserAccount_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.IsDeleted);
-
- CreateTable(
- "dbo.Sys_UserLoginAttempts",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- TenancyName = c.String(maxLength: 64),
- UserId = c.Long(),
- UserNameOrEmailAddress = c.String(maxLength: 255),
- ClientIpAddress = c.String(maxLength: 64),
- ClientName = c.String(maxLength: 128),
- BrowserInfo = c.String(maxLength: 512),
- Result = c.Byte(nullable: false),
- CreationTime = c.DateTime(nullable: false),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserLoginAttempt_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.TenantId)
- .Index(t => new { t.UserId, t.TenantId })
- .Index(t => new { t.TenancyName, t.UserNameOrEmailAddress, t.Result });
-
- CreateTable(
- "dbo.Sys_NotificationUsers",
- c => new
- {
- Id = c.Guid(nullable: false),
- TenantId = c.Int(),
- UserId = c.Long(nullable: false),
- TenantNotificationId = c.Guid(nullable: false),
- State = c.Int(nullable: false),
- CreationTime = c.DateTime(nullable: false),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserNotificationInfo_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.TenantId)
- .Index(t => new { t.UserId, t.State, t.CreationTime });
-
- }
-
- public override void Down()
- {
- DropForeignKey("dbo.Bs_TrainingRoles", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Bs_TrainingRoles", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Bs_TrainingRoles", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Tenants", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Tenants", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Tenants", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Bs_TempInfos", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_States", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_States", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_States", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_SysHelps", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_SysHelps", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_SysHelps", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Functions", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Functions", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Functions", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_AttachFiles", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_AttachFiles", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_AttachFiles", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Roles", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Roles", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Roles", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_RoleClaims", "RoleId", "dbo.Sys_Roles");
- DropForeignKey("dbo.Train_CampGroupScores", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Train_CampGroupScores", "GroupNo", "dbo.Train_CampGroups");
- DropForeignKey("dbo.Train_CampGroupLogs", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Train_CampGroupLogs", "GroupNo", "dbo.Train_CampGroups");
- DropForeignKey("dbo.Train_CampSceneMaps", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Train_CampSceneMaps", "CampNo", "dbo.Train_Camps");
- DropForeignKey("dbo.Train_CampRoleGroups", "RoleGroupNo", "dbo.Bs_TrainingRoleGroups");
- DropForeignKey("dbo.Bs_TrainingRoleGroups", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Bs_TrainingRoleGroups", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Bs_TrainingRoleGroups", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Train_CampRoleGroups", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Train_CampRoleGroups", "CampNo", "dbo.Train_Camps");
- DropForeignKey("dbo.Train_CampGroups", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Train_CampGroups", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Train_CampGroups", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Train_CampGroups", "CampNo", "dbo.Train_Camps");
- DropForeignKey("dbo.Train_BehaviorTags", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Train_BehaviorTags", "CampNo", "dbo.Train_Camps");
- DropForeignKey("dbo.Train_Camps", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Train_Camps", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Train_Camps", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Settings", "UserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_UserRoles", "UserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_UserLogins", "UserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Users", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Users", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Users", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_UserClaims", "UserId", "dbo.Sys_Users");
- DropIndex("dbo.Sys_NotificationUsers", new[] { "UserId", "State", "CreationTime" });
- DropIndex("dbo.Sys_NotificationUsers", new[] { "TenantId" });
- DropIndex("dbo.Sys_UserLoginAttempts", new[] { "TenancyName", "UserNameOrEmailAddress", "Result" });
- DropIndex("dbo.Sys_UserLoginAttempts", new[] { "UserId", "TenantId" });
- DropIndex("dbo.Sys_UserLoginAttempts", new[] { "TenantId" });
- DropIndex("dbo.Sys_UserAccounts", new[] { "IsDeleted" });
- DropIndex("dbo.Bs_TrainingRoles", new[] { "CreatorUserId" });
- DropIndex("dbo.Bs_TrainingRoles", new[] { "LastModifierUserId" });
- DropIndex("dbo.Bs_TrainingRoles", new[] { "DeleterUserId" });
- DropIndex("dbo.Bs_TrainingRoles", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_Tenants", new[] { "CreatorUserId" });
- DropIndex("dbo.Sys_Tenants", new[] { "LastModifierUserId" });
- DropIndex("dbo.Sys_Tenants", new[] { "DeleterUserId" });
- DropIndex("dbo.Sys_Tenants", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_NotificationTenants", new[] { "TenantId" });
- DropIndex("dbo.Bs_TempInfos", new[] { "CreatorUserId" });
- DropIndex("dbo.Sys_States", new[] { "CreatorUserId" });
- DropIndex("dbo.Sys_States", new[] { "LastModifierUserId" });
- DropIndex("dbo.Sys_States", new[] { "DeleterUserId" });
- DropIndex("dbo.Sys_States", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_AuditLogs", new[] { "UserId" });
- DropIndex("dbo.Sys_AuditLogs", new[] { "TenantId" });
- DropIndex("dbo.Sys_SysHelps", new[] { "CreatorUserId" });
- DropIndex("dbo.Sys_SysHelps", new[] { "LastModifierUserId" });
- DropIndex("dbo.Sys_SysHelps", new[] { "DeleterUserId" });
- DropIndex("dbo.Sys_SysHelps", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_Functions", new[] { "CreatorUserId" });
- DropIndex("dbo.Sys_Functions", new[] { "LastModifierUserId" });
- DropIndex("dbo.Sys_Functions", new[] { "DeleterUserId" });
- DropIndex("dbo.Sys_Functions", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_Functions", new[] { "PermissionName" });
- DropIndex("dbo.Sys_Functions", new[] { "FunctionNo" });
- DropIndex("dbo.Sys_AttachFiles", new[] { "CreatorUserId" });
- DropIndex("dbo.Sys_AttachFiles", new[] { "LastModifierUserId" });
- DropIndex("dbo.Sys_AttachFiles", new[] { "DeleterUserId" });
- DropIndex("dbo.Sys_AttachFiles", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_AttachFiles", new[] { "TenantId" });
- DropIndex("dbo.Sys_AppGuids", new[] { "IdType" });
- DropIndex("dbo.Sys_RoleClaims", new[] { "RoleId" });
- DropIndex("dbo.Sys_RoleClaims", new[] { "TenantId" });
- DropIndex("dbo.Sys_Roles", new[] { "CreatorUserId" });
- DropIndex("dbo.Sys_Roles", new[] { "LastModifierUserId" });
- DropIndex("dbo.Sys_Roles", new[] { "DeleterUserId" });
- DropIndex("dbo.Sys_Roles", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_Roles", new[] { "AccountType" });
- DropIndex("dbo.Sys_Roles", new[] { "RoleType" });
- DropIndex("dbo.Sys_Roles", new[] { "Name" });
- DropIndex("dbo.Sys_Roles", new[] { "TenantId" });
- DropIndex("dbo.Sys_NotificationSubscriptions", new[] { "NotificationName", "EntityTypeName", "EntityId", "UserId" });
- DropIndex("dbo.Sys_NotificationSubscriptions", new[] { "TenantId" });
- DropIndex("dbo.Train_CampGroupScores", new[] { "CreatorUserId" });
- DropIndex("dbo.Train_CampGroupScores", new[] { "GroupNo" });
- DropIndex("dbo.Train_CampGroupLogs", new[] { "CreatorUserId" });
- DropIndex("dbo.Train_CampGroupLogs", new[] { "GroupNo" });
- DropIndex("dbo.Sys_Permissions", new[] { "TenantId" });
- DropIndex("dbo.Train_CampSceneMaps", new[] { "CreatorUserId" });
- DropIndex("dbo.Train_CampSceneMaps", new[] { "CampNo" });
- DropIndex("dbo.Bs_TrainingRoleGroups", new[] { "CreatorUserId" });
- DropIndex("dbo.Bs_TrainingRoleGroups", new[] { "LastModifierUserId" });
- DropIndex("dbo.Bs_TrainingRoleGroups", new[] { "DeleterUserId" });
- DropIndex("dbo.Bs_TrainingRoleGroups", new[] { "IsDeleted" });
- DropIndex("dbo.Train_CampRoleGroups", new[] { "CreatorUserId" });
- DropIndex("dbo.Train_CampRoleGroups", new[] { "CampNo" });
- DropIndex("dbo.Train_CampRoleGroups", new[] { "RoleGroupNo" });
- DropIndex("dbo.Train_CampGroups", new[] { "CreatorUserId" });
- DropIndex("dbo.Train_CampGroups", new[] { "LastModifierUserId" });
- DropIndex("dbo.Train_CampGroups", new[] { "DeleterUserId" });
- DropIndex("dbo.Train_CampGroups", new[] { "IsDeleted" });
- DropIndex("dbo.Train_CampGroups", new[] { "CampNo" });
- DropIndex("dbo.Sys_Settings", new[] { "TenantId", "Name", "UserId" });
- DropIndex("dbo.Sys_UserRoles", new[] { "UserId" });
- DropIndex("dbo.Sys_UserRoles", new[] { "TenantId" });
- DropIndex("dbo.Sys_UserLogins", new[] { "UserId" });
- DropIndex("dbo.Sys_UserLogins", new[] { "TenantId" });
- DropIndex("dbo.Sys_UserClaims", new[] { "UserId" });
- DropIndex("dbo.Sys_UserClaims", new[] { "TenantId" });
- DropIndex("dbo.Sys_Users", new[] { "CreatorUserId" });
- DropIndex("dbo.Sys_Users", new[] { "LastModifierUserId" });
- DropIndex("dbo.Sys_Users", new[] { "DeleterUserId" });
- DropIndex("dbo.Sys_Users", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_Users", new[] { "PhoneNumber" });
- DropIndex("dbo.Sys_Users", new[] { "EmailAddress" });
- DropIndex("dbo.Sys_Users", new[] { "TenantId" });
- DropIndex("dbo.Sys_Users", new[] { "AccountType" });
- DropIndex("dbo.Sys_Users", new[] { "UserType" });
- DropIndex("dbo.Sys_Users", new[] { "UserName" });
- DropIndex("dbo.Train_Camps", new[] { "CreatorUserId" });
- DropIndex("dbo.Train_Camps", new[] { "LastModifierUserId" });
- DropIndex("dbo.Train_Camps", new[] { "DeleterUserId" });
- DropIndex("dbo.Train_Camps", new[] { "IsDeleted" });
- DropIndex("dbo.Train_BehaviorTags", new[] { "CreatorUserId" });
- DropIndex("dbo.Train_BehaviorTags", new[] { "CampNo" });
- DropTable("dbo.Sys_NotificationUsers",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserNotificationInfo_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_UserLoginAttempts",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserLoginAttempt_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_UserAccounts",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserAccount_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Bs_TrainingRoles",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_TrainingRoleInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_Tenants",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_Tenant_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_NotificationTenants",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_TenantNotificationInfo_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Bs_TempInfos");
- DropTable("dbo.Sys_States",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysState_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_AuditLogs",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysLog_MustHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_SysHelps",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysHelp_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_Functions",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysFunction_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_AttachFiles",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysAttachFile_MustHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_SysAttachFile_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_AppGuids");
- DropTable("dbo.Sys_RoleClaims",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_RoleClaim_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_Roles",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_Role_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_Role_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_NotificationSubscriptions",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_NotificationSubscriptionInfo_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_Notifications");
- DropTable("dbo.Train_CampGroupScores");
- DropTable("dbo.Train_CampGroupLogs");
- DropTable("dbo.Sys_Permissions",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_DataPermission_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_PermissionSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_RolePermissionSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_UserPermissionSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Train_CampSceneMaps");
- DropTable("dbo.Bs_TrainingRoleGroups",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_TrainingRoleGroupInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Train_CampRoleGroups");
- DropTable("dbo.Train_CampGroups",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_CampGroupInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_Settings",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_UserRoles",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserRole_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_UserLogins",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserLogin_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_UserClaims",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserClaim_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_Users",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_User_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_User_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Train_Camps",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_CampInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Train_BehaviorTags");
- }
- }
- }
|