Add migration - NOTE the Log Vehicle index wasn't named as it was expecting
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// <auto-generated />
|
||||
namespace MileageTraker.Web.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
|
||||
public sealed partial class LogVehicleRelationship : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(LogVehicleRelationship));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "201510021445490_LogVehicleRelationship"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user