| 1234567891011121314151617181920212223242526272829303132333435363738 |
- namespace WePlatform.Migrations
- {
- using System;
- using System.Data.Entity.Migrations;
-
- public partial class AddGuideRelatedInfo : DbMigration
- {
- public override void Up()
- {
- CreateTable(
- "dbo.WeLib_GuideRelated",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- RelatedNo = c.String(maxLength: 128),
- RelatedType = c.Int(nullable: false),
- GuideNo = 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_Guides", t => t.GuideNo)
- .Index(t => t.GuideNo)
- .Index(t => t.CreatorUserId);
-
- }
-
- public override void Down()
- {
- DropForeignKey("dbo.WeLib_GuideRelated", "GuideNo", "dbo.WeLib_Guides");
- DropForeignKey("dbo.WeLib_GuideRelated", "CreatorUserId", "dbo.Sys_Users");
- DropIndex("dbo.WeLib_GuideRelated", new[] { "CreatorUserId" });
- DropIndex("dbo.WeLib_GuideRelated", new[] { "GuideNo" });
- DropTable("dbo.WeLib_GuideRelated");
- }
- }
- }
|