Added Status In Purchase Invoice Details Table
This commit is contained in:
parent
d1f5240f8f
commit
fa1c534ba8
9411
Marco.Pms.DataAccess/Migrations/20251125143000_Added_Status_In_PurchaseInvoiceDetails_Table.Designer.cs
generated
Normal file
9411
Marco.Pms.DataAccess/Migrations/20251125143000_Added_Status_In_PurchaseInvoiceDetails_Table.Designer.cs
generated
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,84 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Added_Status_In_PurchaseInvoiceDetails_Table : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "StatusId",
|
||||
table: "PurchaseInvoiceDetails",
|
||||
type: "char(36)",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("8a5ef25e-3c9e-45de-add9-6b1c1df54381"),
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "InvoiceAttachmentTypeId",
|
||||
table: "PurchaseInvoiceAttachments",
|
||||
type: "char(36)",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("3ca08288-0a74-4850-9948-0783aa975b84"),
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PurchaseInvoiceDetails_StatusId",
|
||||
table: "PurchaseInvoiceDetails",
|
||||
column: "StatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PurchaseInvoiceAttachments_InvoiceAttachmentTypeId",
|
||||
table: "PurchaseInvoiceAttachments",
|
||||
column: "InvoiceAttachmentTypeId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PurchaseInvoiceAttachments_InvoiceAttachmentTypes_InvoiceAtt~",
|
||||
table: "PurchaseInvoiceAttachments",
|
||||
column: "InvoiceAttachmentTypeId",
|
||||
principalTable: "InvoiceAttachmentTypes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PurchaseInvoiceDetails_PurchaseInvoiceStatus_StatusId",
|
||||
table: "PurchaseInvoiceDetails",
|
||||
column: "StatusId",
|
||||
principalTable: "PurchaseInvoiceStatus",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PurchaseInvoiceAttachments_InvoiceAttachmentTypes_InvoiceAtt~",
|
||||
table: "PurchaseInvoiceAttachments");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PurchaseInvoiceDetails_PurchaseInvoiceStatus_StatusId",
|
||||
table: "PurchaseInvoiceDetails");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PurchaseInvoiceDetails_StatusId",
|
||||
table: "PurchaseInvoiceDetails");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PurchaseInvoiceAttachments_InvoiceAttachmentTypeId",
|
||||
table: "PurchaseInvoiceAttachments");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "StatusId",
|
||||
table: "PurchaseInvoiceDetails");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "InvoiceAttachmentTypeId",
|
||||
table: "PurchaseInvoiceAttachments");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5061,6 +5061,9 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
b.Property<Guid>("DocumentId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("InvoiceAttachmentTypeId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("PurchaseInvoiceId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
@ -5077,6 +5080,8 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
|
||||
b.HasIndex("DocumentId");
|
||||
|
||||
b.HasIndex("InvoiceAttachmentTypeId");
|
||||
|
||||
b.HasIndex("PurchaseInvoiceId");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
@ -5161,6 +5166,9 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<Guid>("StatusId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("SupplierId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
@ -5199,6 +5207,8 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
|
||||
b.HasIndex("OrganizationId");
|
||||
|
||||
b.HasIndex("StatusId");
|
||||
|
||||
b.HasIndex("SupplierId");
|
||||
|
||||
b.HasIndex("TenantId");
|
||||
@ -8599,6 +8609,12 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.PurchaseInvoice.InvoiceAttachmentType", "InvoiceAttachmentType")
|
||||
.WithMany()
|
||||
.HasForeignKey("InvoiceAttachmentTypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.PurchaseInvoice.PurchaseInvoiceDetails", "PurchaseInvoice")
|
||||
.WithMany()
|
||||
.HasForeignKey("PurchaseInvoiceId")
|
||||
@ -8619,6 +8635,8 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
|
||||
b.Navigation("Document");
|
||||
|
||||
b.Navigation("InvoiceAttachmentType");
|
||||
|
||||
b.Navigation("PurchaseInvoice");
|
||||
|
||||
b.Navigation("Tenant");
|
||||
@ -8640,6 +8658,12 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.PurchaseInvoice.PurchaseInvoiceStatus", "Status")
|
||||
.WithMany()
|
||||
.HasForeignKey("StatusId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Marco.Pms.Model.OrganizationModel.Organization", "Supplier")
|
||||
.WithMany()
|
||||
.HasForeignKey("SupplierId")
|
||||
@ -8660,6 +8684,8 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
|
||||
b.Navigation("Organization");
|
||||
|
||||
b.Navigation("Status");
|
||||
|
||||
b.Navigation("Supplier");
|
||||
|
||||
b.Navigation("Tenant");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user