namespace FotbalPortal.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class addCategory : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.Categories",
                c => new
                    {
                        id = c.Int(nullable: false, identity: true),
                        parentID = c.Int(nullable: true),
                    })
                .PrimaryKey(t => t.id)
                .ForeignKey("dbo.Categories", t => t.parentID)
                .Index(t => t.parentID);
            
        }
        
        public override void Down()
        {
            DropIndex("dbo.Categories", new[] { "parentID" });
            DropForeignKey("dbo.Categories", "parentID", "dbo.Categories");
            DropTable("dbo.Categories");
        }
    }
}
