namespace DataAccessLayer.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class VcUpdate : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("dbo.EmployeeVacations", "EmployeeId", "dbo.Employees");
            DropIndex("dbo.EmployeeVacations", new[] { "EmployeeId" });
            DropTable("dbo.EmployeeVacations");
        }
        
        public override void Down()
        {
            CreateTable(
                "dbo.EmployeeVacations",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        EmployeeId = c.Int(nullable: false),
                        VacationDays = c.Int(nullable: false),
                        Year = c.Int(nullable: false),
                    })
                .PrimaryKey(t => t.Id);
            
            CreateIndex("dbo.EmployeeVacations", "EmployeeId");
            AddForeignKey("dbo.EmployeeVacations", "EmployeeId", "dbo.Employees", "Id", cascadeDelete: true);
        }
    }
}
