summaryrefslogtreecommitdiff
path: root/Project-Unite/Migrations/201703162001254_jonny___.cs
blob: 910eae9584084c0014783fd608273f44f16d95b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
namespace Project_Unite.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class jonny___ : DbMigration
    {
        public override void Up()
        {
        }
        
        public override void Down()
        {
            AddColumn("dbo.ForumTopics", "Parent_Parent", c => c.String(nullable: false, maxLength: 128));
            AddColumn("dbo.ACLForumPermissions", "Parent_Parent", c => c.String(nullable: false, maxLength: 128));
            AddColumn("dbo.ForumCategories", "ForumCategory_Parent", c => c.String(maxLength: 128));
            AddColumn("dbo.ForumCategories", "ForumCategory_Id", c => c.String(maxLength: 128));
            DropForeignKey("dbo.ForumTopics", "Parent_Id", "dbo.ForumCategories");
            DropForeignKey("dbo.ACLForumPermissions", "Parent_Id", "dbo.ForumCategories");
            DropIndex("dbo.ForumTopics", new[] { "Parent_Id" });
            DropIndex("dbo.ACLForumPermissions", new[] { "Parent_Id" });
            DropPrimaryKey("dbo.ForumCategories");
            AlterColumn("dbo.ForumCategories", "Parent", c => c.String(nullable: false, maxLength: 128));
            AddPrimaryKey("dbo.ForumCategories", new[] { "Id", "Parent" });
            CreateIndex("dbo.ForumTopics", new[] { "Parent_Id", "Parent_Parent" });
            CreateIndex("dbo.ACLForumPermissions", new[] { "Parent_Id", "Parent_Parent" });
            CreateIndex("dbo.ForumCategories", new[] { "ForumCategory_Id", "ForumCategory_Parent" });
            AddForeignKey("dbo.ForumTopics", new[] { "Parent_Id", "Parent_Parent" }, "dbo.ForumCategories", new[] { "Id", "Parent" }, cascadeDelete: true);
            AddForeignKey("dbo.ACLForumPermissions", new[] { "Parent_Id", "Parent_Parent" }, "dbo.ForumCategories", new[] { "Id", "Parent" }, cascadeDelete: true);
            AddForeignKey("dbo.ForumCategories", new[] { "ForumCategory_Id", "ForumCategory_Parent" }, "dbo.ForumCategories", new[] { "Id", "Parent" });
        }
    }
}