namespace MileageTraker.Web.Migrations
{
    using System.Data.Entity.Migrations;
    
    public partial class UpdateLogUserRequired : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("Log", "User_UserId", "User");
            DropIndex("Log", new[] { "User_UserId" });
            AlterColumn("Log", "User_UserId", c => c.Guid(nullable: false));
            AddForeignKey("Log", "User_UserId", "User", "UserId", cascadeDelete: true);
            CreateIndex("Log", "User_UserId");
        }
        
        public override void Down()
        {
            DropIndex("Log", new[] { "User_UserId" });
            DropForeignKey("Log", "User_UserId", "User");
            AlterColumn("Log", "User_UserId", c => c.Guid());
            CreateIndex("Log", "User_UserId");
            AddForeignKey("Log", "User_UserId", "User", "UserId");
        }
    }
}
