| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- namespace WeApp.Migrations
- {
- using System;
- using System.Data.Entity.Migrations;
-
- public partial class AddPortrait : DbMigration
- {
- public override void Up()
- {
- CreateTable(
- "dbo.Train_CampGroupPortraits",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- CampNo = c.String(maxLength: 128),
- GroupNo = c.String(maxLength: 128),
- SceneCount = c.Int(nullable: false),
- RoleCount = c.Int(nullable: false),
- CmdCount = c.Int(nullable: false),
- SceneRemark = c.String(maxLength: 1000),
- SiGongRemark = c.String(maxLength: 1000),
- WuLiRemark = c.String(maxLength: 1000),
- ShortRemark = c.String(maxLength: 1000),
- SceneInfos = c.String(),
- TrainingInfos = c.String(),
- RoleCmdInfos = c.String(),
- RoundScoreInfos = c.String(),
- SiGongInfos = c.String(),
- WuLiInfos = c.String(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Train_CampGroups", t => t.GroupNo)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.GroupNo)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
- }
- public override void Down()
- {
- DropForeignKey("dbo.Train_CampGroupPortraits", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Train_CampGroupPortraits", "GroupNo", "dbo.Train_CampGroups");
- DropForeignKey("dbo.Train_CampGroupPortraits", "CreatorUserId", "dbo.Sys_Users");
- DropIndex("dbo.Train_CampGroupPortraits", new[] { "CreatorUserId" });
- DropIndex("dbo.Train_CampGroupPortraits", new[] { "LastModifierUserId" });
- DropIndex("dbo.Train_CampGroupPortraits", new[] { "GroupNo" });
- DropTable("dbo.Train_CampGroupPortraits");
- }
-
- }
- }
|