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
@@ -211,6 +211,10 @@
|
||||
<Compile Include="Migrations\201509111820437_FuelLog.Designer.cs">
|
||||
<DependentUpon>201509111820437_FuelLog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\201510021445490_LogVehicleRelationship.cs" />
|
||||
<Compile Include="Migrations\201510021445490_LogVehicleRelationship.Designer.cs">
|
||||
<DependentUpon>201510021445490_LogVehicleRelationship.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\Configuration.cs" />
|
||||
<Compile Include="Models\DomainRules.cs" />
|
||||
<Compile Include="Models\FuelLog.cs" />
|
||||
@@ -544,6 +548,9 @@
|
||||
<EmbeddedResource Include="Migrations\201509111820437_FuelLog.resx">
|
||||
<DependentUpon>201509111820437_FuelLog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\201510021445490_LogVehicleRelationship.resx">
|
||||
<DependentUpon>201510021445490_LogVehicleRelationship.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
|
||||
Reference in New Issue
Block a user