namespace ToDoList.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class TaskModel : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.Tasks",
                c => new
                    {
                        TaskId = c.Int(nullable: false, identity: true),
                        Title = c.String(),
                        Status = c.Int(nullable: false),
                        Description = c.String(),
                        List_ListId = c.Int(),
                    })
                .PrimaryKey(t => t.TaskId)
                .ForeignKey("dbo.Lists", t => t.List_ListId)
                .Index(t => t.List_ListId);
            
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.Tasks", "List_ListId", "dbo.Lists");
            DropIndex("dbo.Tasks", new[] { "List_ListId" });
            DropTable("dbo.Tasks");
        }
    }
}
