Replace Log.EmployeeName with Log.User, drop from database
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user