remove the ride cancel request
This commit is contained in:
+3992
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Distribution.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class RemoveRideCancelRequest : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "RideCancelRequests");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "RideCancelRequests",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
FK_RideId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
ApprovedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||
ApprovedBy = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
||||
Reason = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
RequestedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
RequestedBy = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
||||
Status = table.Column<int>(type: "int", nullable: false),
|
||||
TypeCode = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_RideCancelRequests", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_RideCancelRequests_DeliveryRuns_FK_RideId",
|
||||
column: x => x.FK_RideId,
|
||||
principalTable: "DeliveryRuns",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
table: "RideCancelRequests",
|
||||
columns: new[] { "Id", "ApprovedAt", "ApprovedBy", "FK_RideId", "Reason", "RequestedAt", "RequestedBy", "Status", "TypeCode" },
|
||||
values: new object[] { new Guid("65000000-0000-0000-0000-000000000001"), new DateTime(2026, 8, 30, 9, 15, 0, 0, DateTimeKind.Unspecified), new Guid("29000000-0000-0000-0000-000000000001"), new Guid("31000000-0000-0000-0000-000000000002"), "Reported minor engine issue, resolved after inspection", new DateTime(2026, 8, 30, 9, 10, 0, 0, DateTimeKind.Unspecified), new Guid("29000000-0000-0000-0000-000000000005"), 2, 0 });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RideCancelRequests_FK_RideId",
|
||||
table: "RideCancelRequests",
|
||||
column: "FK_RideId");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1407,58 +1407,6 @@ namespace Distribution.Migrations
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Distribution.Models.RideCancelRequest", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime?>("ApprovedAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<Guid?>("ApprovedBy")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("FK_RideId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime>("RequestedAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<Guid>("RequestedBy")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("FK_RideId");
|
||||
|
||||
b.ToTable("RideCancelRequests");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
Id = new Guid("65000000-0000-0000-0000-000000000001"),
|
||||
ApprovedAt = new DateTime(2026, 8, 30, 9, 15, 0, 0, DateTimeKind.Unspecified),
|
||||
ApprovedBy = new Guid("29000000-0000-0000-0000-000000000001"),
|
||||
FK_RideId = new Guid("31000000-0000-0000-0000-000000000002"),
|
||||
Reason = "Reported minor engine issue, resolved after inspection",
|
||||
RequestedAt = new DateTime(2026, 8, 30, 9, 10, 0, 0, DateTimeKind.Unspecified),
|
||||
RequestedBy = new Guid("29000000-0000-0000-0000-000000000005"),
|
||||
Status = 2,
|
||||
TypeCode = 0
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Distribution.Models.Role", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@@ -3553,17 +3501,6 @@ namespace Distribution.Migrations
|
||||
b.Navigation("Region");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Distribution.Models.RideCancelRequest", b =>
|
||||
{
|
||||
b.HasOne("Distribution.Models.DeliveryRun", "Ride")
|
||||
.WithMany()
|
||||
.HasForeignKey("FK_RideId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Ride");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Distribution.Models.RolePermission", b =>
|
||||
{
|
||||
b.HasOne("Distribution.Models.Permission", "Permission")
|
||||
|
||||
Reference in New Issue
Block a user