| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- namespace WeApp.Migrations
- {
- using System;
- using System.Collections.Generic;
- using System.Data.Entity.Infrastructure.Annotations;
- using System.Data.Entity.Migrations;
-
- public partial class AddPortraitRemark : DbMigration
- {
- public override void Up()
- {
- CreateTable(
- "dbo.Bs_PortraitMassage",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- Name = c.String(maxLength: 50),
- RemarkContent = c.String(maxLength: 500),
- RemarkType = c.Int(nullable: false),
- 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_PortraitRemarkInfo_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);
-
- AddColumn("dbo.Train_CampGroups", "RoundIndex", c => c.Int(nullable: false));
- }
-
- public override void Down()
- {
- DropForeignKey("dbo.Bs_PortraitMassage", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Bs_PortraitMassage", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Bs_PortraitMassage", "CreatorUserId", "dbo.Sys_Users");
- DropIndex("dbo.Bs_PortraitMassage", new[] { "CreatorUserId" });
- DropIndex("dbo.Bs_PortraitMassage", new[] { "LastModifierUserId" });
- DropIndex("dbo.Bs_PortraitMassage", new[] { "DeleterUserId" });
- DropIndex("dbo.Bs_PortraitMassage", new[] { "IsDeleted" });
- DropColumn("dbo.Train_CampGroups", "RoundIndex");
- DropTable("dbo.Bs_PortraitMassage",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_PortraitRemarkInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- }
- }
- }
|