namespace WeApp.Migrations { using System; using System.Collections.Generic; using System.Data.Entity.Infrastructure.Annotations; using System.Data.Entity.Migrations; public partial class Update2024001 : DbMigration { public override void Up() { RenameTable(name: "dbo.Bs_StudentHelps", newName: "Bs_StudentTips"); AlterTableAnnotations( "dbo.Bs_StudentTips", c => new { Id = c.String(nullable: false, maxLength: 128), Name = c.String(maxLength: 50), RoleName = c.String(maxLength: 50), Content = 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 { { "DynamicFilter_StudentHelpInfo_SoftDelete", new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null) }, { "DynamicFilter_StudentTipInfo_SoftDelete", new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition") }, }); AddColumn("dbo.Train_Camps", "IsShowTip", c => c.Boolean(nullable: false)); AddColumn("dbo.Bs_StudentTips", "Name", c => c.String(maxLength: 50)); AddColumn("dbo.Bs_StudentTips", "RoleName", c => c.String(maxLength: 50)); AddColumn("dbo.Bs_StudentTips", "Content", c => c.String(maxLength: 200)); AddColumn("dbo.Train_CampSceneMaps", "TipNos", c => c.String()); AddColumn("dbo.Train_CampGroupLogs", "ScenePath", c => c.String(maxLength: 500)); DropColumn("dbo.Bs_StudentTips", "HelpName"); DropColumn("dbo.Bs_StudentTips", "HelpContent"); } public override void Down() { AddColumn("dbo.Bs_StudentTips", "HelpContent", c => c.String(maxLength: 200)); AddColumn("dbo.Bs_StudentTips", "HelpName", c => c.String(maxLength: 50)); DropColumn("dbo.Train_CampGroupLogs", "ScenePath"); DropColumn("dbo.Train_CampSceneMaps", "TipNos"); DropColumn("dbo.Bs_StudentTips", "Content"); DropColumn("dbo.Bs_StudentTips", "RoleName"); DropColumn("dbo.Bs_StudentTips", "Name"); DropColumn("dbo.Train_Camps", "IsShowTip"); AlterTableAnnotations( "dbo.Bs_StudentTips", c => new { Id = c.String(nullable: false, maxLength: 128), Name = c.String(maxLength: 50), RoleName = c.String(maxLength: 50), Content = 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 { { "DynamicFilter_StudentHelpInfo_SoftDelete", new AnnotationValues(oldValue: null, newValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition") }, { "DynamicFilter_StudentTipInfo_SoftDelete", new AnnotationValues(oldValue: "EntityFramework.DynamicFilters.DynamicFilterDefinition", newValue: null) }, }); RenameTable(name: "dbo.Bs_StudentTips", newName: "Bs_StudentHelps"); } } }