| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- namespace WePlatform.Migrations
- {
- using System;
- using System.Data.Entity.Migrations;
-
- public partial class Update20508001 : DbMigration
- {
- public override void Up()
- {
- CreateTable(
- "dbo.WeLib_EnvironResourceRelated",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- RelatedNo = c.String(maxLength: 128),
- RelatedType = c.Int(nullable: false),
- EnvironResourceNo = c.String(maxLength: 128),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.WeLib_EnvironResources", t => t.EnvironResourceNo)
- .Index(t => t.EnvironResourceNo)
- .Index(t => t.CreatorUserId);
-
- AddColumn("dbo.WeLib_Packages", "Variable", c => c.String(maxLength: 500));
- AddColumn("dbo.WeLib_Scenes", "Variable", c => c.String(maxLength: 500));
- AddColumn("dbo.WeLib_SceneFlows", "Variable", c => c.String(maxLength: 500));
- }
-
- public override void Down()
- {
- DropForeignKey("dbo.WeLib_EnvironResourceRelated", "EnvironResourceNo", "dbo.WeLib_Guides");
- DropForeignKey("dbo.WeLib_EnvironResourceRelated", "CreatorUserId", "dbo.Sys_Users");
- DropIndex("dbo.WeLib_EnvironResourceRelated", new[] { "CreatorUserId" });
- DropIndex("dbo.WeLib_EnvironResourceRelated", new[] { "EnvironResourceNo" });
- DropColumn("dbo.WeLib_SceneFlows", "Variable");
- DropColumn("dbo.WeLib_Scenes", "Variable");
- DropColumn("dbo.WeLib_Packages", "Variable");
- DropTable("dbo.WeLib_EnvironResourceRelated");
- }
- }
- }
|