namespace DataAccessLayer.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class Update5 : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("dbo.TimeSheetRecords", "EmployeeId", "dbo.Employees");
            DropIndex("dbo.TimeSheetRecords", new[] { "EmployeeId" });
            AlterColumn("dbo.TimeSheetRecords", "EmployeeId", c => c.Int());
            CreateIndex("dbo.TimeSheetRecords", "EmployeeId");
            AddForeignKey("dbo.TimeSheetRecords", "EmployeeId", "dbo.Employees", "Id");
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.TimeSheetRecords", "EmployeeId", "dbo.Employees");
            DropIndex("dbo.TimeSheetRecords", new[] { "EmployeeId" });
            AlterColumn("dbo.TimeSheetRecords", "EmployeeId", c => c.Int(nullable: false));
            CreateIndex("dbo.TimeSheetRecords", "EmployeeId");
            AddForeignKey("dbo.TimeSheetRecords", "EmployeeId", "dbo.Employees", "Id", cascadeDelete: true);
        }
    }
}
