| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- namespace WePlatform.Migrations
- {
- using System;
- using System.Collections.Generic;
- using System.Data.Entity.Infrastructure.Annotations;
- using System.Data.Entity.Migrations;
-
- public partial class Update427001 : DbMigration
- {
- public override void Up()
- {
- DropForeignKey("dbo.WeLib_Behaviors", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.WeModel_EngineModels", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.WeLib_Guides", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.WeLib_Scenes", "DeleterUserId", "dbo.Sys_Users");
- DropIndex("dbo.WeLib_Behaviors", new[] { "IsDeleted" });
- DropIndex("dbo.WeLib_Behaviors", new[] { "DeleterUserId" });
- DropIndex("dbo.WeModel_EngineModels", new[] { "IsDeleted" });
- DropIndex("dbo.WeModel_EngineModels", new[] { "DeleterUserId" });
- DropIndex("dbo.WeLib_Guides", new[] { "IsDeleted" });
- DropIndex("dbo.WeLib_Guides", new[] { "DeleterUserId" });
- DropIndex("dbo.WeLib_Scenes", new[] { "IsDeleted" });
- DropIndex("dbo.WeLib_Scenes", new[] { "DeleterUserId" });
- AlterTableAnnotations(
- "dbo.WeLib_Behaviors",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- SceneCategory = c.String(maxLength: 128),
- BehaviorTag = c.String(maxLength: 500),
- Description = c.String(maxLength: 500),
- RoleLogicType = c.Int(nullable: false),
- RuleKeyword = c.String(maxLength: 500),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, AnnotationValues>
- {
- {
- "DynamicFilter_BehaviorInfo_SoftDelete",
- new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null)
- },
- });
-
- AlterTableAnnotations(
- "dbo.WeModel_EngineModels",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- ModelName = c.String(maxLength: 50),
- Version = c.String(maxLength: 50),
- Description = c.String(maxLength: 500),
- ModelType = c.Int(nullable: false),
- EngineNo = c.String(maxLength: 128),
- Remark = c.String(maxLength: 500),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, AnnotationValues>
- {
- {
- "DynamicFilter_EngineModelInfo_SoftDelete",
- new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null)
- },
- });
-
- AlterTableAnnotations(
- "dbo.WeLib_Guides",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- Name = c.String(maxLength: 50),
- Description = c.String(maxLength: 500),
- GuideType = c.Int(nullable: false),
- Remark = c.String(maxLength: 500),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, AnnotationValues>
- {
- {
- "DynamicFilter_GuideInfo_SoftDelete",
- new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null)
- },
- });
-
- AlterTableAnnotations(
- "dbo.WeLib_Scenes",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- Name = c.String(maxLength: 50),
- SceneCategory = c.String(maxLength: 128),
- SceneTag = c.String(maxLength: 200),
- Description = c.String(maxLength: 500),
- SceneType = c.Int(nullable: false),
- Remark = c.String(maxLength: 500),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, AnnotationValues>
- {
- {
- "DynamicFilter_SceneInfo_SoftDelete",
- new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null)
- },
- });
-
- DropColumn("dbo.WeLib_Behaviors", "IsDeleted");
- DropColumn("dbo.WeLib_Behaviors", "DeleterUserId");
- DropColumn("dbo.WeLib_Behaviors", "DeletionTime");
- DropColumn("dbo.WeModel_EngineModels", "IsDeleted");
- DropColumn("dbo.WeModel_EngineModels", "DeleterUserId");
- DropColumn("dbo.WeModel_EngineModels", "DeletionTime");
- DropColumn("dbo.WeLib_Guides", "IsDeleted");
- DropColumn("dbo.WeLib_Guides", "DeleterUserId");
- DropColumn("dbo.WeLib_Guides", "DeletionTime");
- DropColumn("dbo.WeLib_Scenes", "IsDeleted");
- DropColumn("dbo.WeLib_Scenes", "DeleterUserId");
- DropColumn("dbo.WeLib_Scenes", "DeletionTime");
- }
-
- public override void Down()
- {
- AddColumn("dbo.WeLib_Scenes", "DeletionTime", c => c.DateTime());
- AddColumn("dbo.WeLib_Scenes", "DeleterUserId", c => c.Long());
- AddColumn("dbo.WeLib_Scenes", "IsDeleted", c => c.Boolean(nullable: false));
- AddColumn("dbo.WeLib_Guides", "DeletionTime", c => c.DateTime());
- AddColumn("dbo.WeLib_Guides", "DeleterUserId", c => c.Long());
- AddColumn("dbo.WeLib_Guides", "IsDeleted", c => c.Boolean(nullable: false));
- AddColumn("dbo.WeModel_EngineModels", "DeletionTime", c => c.DateTime());
- AddColumn("dbo.WeModel_EngineModels", "DeleterUserId", c => c.Long());
- AddColumn("dbo.WeModel_EngineModels", "IsDeleted", c => c.Boolean(nullable: false));
- AddColumn("dbo.WeLib_Behaviors", "DeletionTime", c => c.DateTime());
- AddColumn("dbo.WeLib_Behaviors", "DeleterUserId", c => c.Long());
- AddColumn("dbo.WeLib_Behaviors", "IsDeleted", c => c.Boolean(nullable: false));
- AlterTableAnnotations(
- "dbo.WeLib_Scenes",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- Name = c.String(maxLength: 50),
- SceneCategory = c.String(maxLength: 128),
- SceneTag = c.String(maxLength: 200),
- Description = c.String(maxLength: 500),
- SceneType = c.Int(nullable: false),
- Remark = c.String(maxLength: 500),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, AnnotationValues>
- {
- {
- "DynamicFilter_SceneInfo_SoftDelete",
- new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition")
- },
- });
-
- AlterTableAnnotations(
- "dbo.WeLib_Guides",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- Name = c.String(maxLength: 50),
- Description = c.String(maxLength: 500),
- GuideType = c.Int(nullable: false),
- Remark = c.String(maxLength: 500),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, AnnotationValues>
- {
- {
- "DynamicFilter_GuideInfo_SoftDelete",
- new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition")
- },
- });
-
- AlterTableAnnotations(
- "dbo.WeModel_EngineModels",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- ModelName = c.String(maxLength: 50),
- Version = c.String(maxLength: 50),
- Description = c.String(maxLength: 500),
- ModelType = c.Int(nullable: false),
- EngineNo = c.String(maxLength: 128),
- Remark = c.String(maxLength: 500),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, AnnotationValues>
- {
- {
- "DynamicFilter_EngineModelInfo_SoftDelete",
- new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition")
- },
- });
-
- AlterTableAnnotations(
- "dbo.WeLib_Behaviors",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- SceneCategory = c.String(maxLength: 128),
- BehaviorTag = c.String(maxLength: 500),
- Description = c.String(maxLength: 500),
- RoleLogicType = c.Int(nullable: false),
- RuleKeyword = c.String(maxLength: 500),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, AnnotationValues>
- {
- {
- "DynamicFilter_BehaviorInfo_SoftDelete",
- new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition")
- },
- });
-
- CreateIndex("dbo.WeLib_Scenes", "DeleterUserId");
- CreateIndex("dbo.WeLib_Scenes", "IsDeleted");
- CreateIndex("dbo.WeLib_Guides", "DeleterUserId");
- CreateIndex("dbo.WeLib_Guides", "IsDeleted");
- CreateIndex("dbo.WeModel_EngineModels", "DeleterUserId");
- CreateIndex("dbo.WeModel_EngineModels", "IsDeleted");
- CreateIndex("dbo.WeLib_Behaviors", "DeleterUserId");
- CreateIndex("dbo.WeLib_Behaviors", "IsDeleted");
- AddForeignKey("dbo.WeLib_Scenes", "DeleterUserId", "dbo.Sys_Users", "Id");
- AddForeignKey("dbo.WeLib_Guides", "DeleterUserId", "dbo.Sys_Users", "Id");
- AddForeignKey("dbo.WeModel_EngineModels", "DeleterUserId", "dbo.Sys_Users", "Id");
- AddForeignKey("dbo.WeLib_Behaviors", "DeleterUserId", "dbo.Sys_Users", "Id");
- }
- }
- }
|