Add migration - NOTE the Log Vehicle index wasn't named as it was expecting

This commit is contained in:
2015-10-02 11:00:10 -04:00
parent 0a90d48f2d
commit 3a4da9d1a1
4 changed files with 182 additions and 0 deletions
@@ -0,0 +1,20 @@
namespace MileageTraker.Web.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class LogVehicleRelationship : DbMigration
{
public override void Up()
{
RenameColumn(table: "dbo.Log", name: "VehicleId", newName: "Vehicle_VehicleId");
RenameIndex(table: "dbo.Log", name: "IDX_VehicleId", newName: "IX_Vehicle_VehicleId");
}
public override void Down()
{
RenameIndex(table: "dbo.Log", name: "IX_Vehicle_VehicleId", newName: "IDX_VehicleId");
RenameColumn(table: "dbo.Log", name: "Vehicle_VehicleId", newName: "VehicleId");
}
}
}