Add vehicle recall
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.2.0-61023")]
|
||||
public sealed partial class VehicleRecall : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(VehicleRecall));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "202008300135173_VehicleRecall"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
namespace MileageTraker.Web.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class VehicleRecall : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
CreateTable(
|
||||
"dbo.VehicleRecall",
|
||||
c => new
|
||||
{
|
||||
VehicleRecallId = c.Int(nullable: false, identity: true),
|
||||
Identifier = c.String(nullable: false, maxLength: 128),
|
||||
Description = c.String(nullable: false, maxLength: 128),
|
||||
CompletedService_VehicleServiceId = c.Int(),
|
||||
Vehicle_VehicleId = c.String(nullable: false, maxLength: 6),
|
||||
})
|
||||
.PrimaryKey(t => t.VehicleRecallId)
|
||||
.ForeignKey("dbo.VehicleService", t => t.CompletedService_VehicleServiceId)
|
||||
.ForeignKey("dbo.Vehicle", t => t.Vehicle_VehicleId, cascadeDelete: true)
|
||||
.Index(t => t.CompletedService_VehicleServiceId)
|
||||
.Index(t => t.Vehicle_VehicleId);
|
||||
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropForeignKey("dbo.VehicleRecall", "Vehicle_VehicleId", "dbo.Vehicle");
|
||||
DropForeignKey("dbo.VehicleRecall", "CompletedService_VehicleServiceId", "dbo.VehicleService");
|
||||
DropIndex("dbo.VehicleRecall", new[] { "Vehicle_VehicleId" });
|
||||
DropIndex("dbo.VehicleRecall", new[] { "CompletedService_VehicleServiceId" });
|
||||
DropTable("dbo.VehicleRecall");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user