| 1234567891011121314151617181920212223242526272829303132333435 |
- namespace WeApp.Migrations
- {
- using System;
- using System.Data.Entity.Migrations;
-
- public partial class AddGroupRole : DbMigration
- {
- public override void Up()
- {
- CreateTable(
- "dbo.Train_CampGroupRoles",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- GroupNo = c.String(),
- RoleNames = 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);
-
- AddColumn("dbo.Train_CampGroups", "RunningInfo", c => c.String());
- }
-
- public override void Down()
- {
- DropForeignKey("dbo.Train_CampGroupRoles", "CreatorUserId", "dbo.Sys_Users");
- DropIndex("dbo.Train_CampGroupRoles", new[] { "CreatorUserId" });
- DropColumn("dbo.Train_CampGroups", "RunningInfo");
- DropTable("dbo.Train_CampGroupRoles");
- }
- }
- }
|