revert 7273f49b3ffd96f11fc8220e5d3e4ef663179541
revert Make the payment details nullable
This commit is contained in:
parent
08b2cfe844
commit
bd839b12f9
File diff suppressed because one or more lines are too long
@ -1,64 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Marco.Pms.DataAccess.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class Make_PaymentDetails_In_TenantSubscription_Table : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_PaymentDetails_PaymentDetailId",
|
|
||||||
table: "TenantSubscriptions");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "PaymentDetailId",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: true,
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)")
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_PaymentDetails_PaymentDetailId",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
column: "PaymentDetailId",
|
|
||||||
principalTable: "PaymentDetails",
|
|
||||||
principalColumn: "Id");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_PaymentDetails_PaymentDetailId",
|
|
||||||
table: "TenantSubscriptions");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<Guid>(
|
|
||||||
name: "PaymentDetailId",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
type: "char(36)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
||||||
collation: "ascii_general_ci",
|
|
||||||
oldClrType: typeof(Guid),
|
|
||||||
oldType: "char(36)",
|
|
||||||
oldNullable: true)
|
|
||||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
||||||
|
|
||||||
migrationBuilder.AddForeignKey(
|
|
||||||
name: "FK_TenantSubscriptions_PaymentDetails_PaymentDetailId",
|
|
||||||
table: "TenantSubscriptions",
|
|
||||||
column: "PaymentDetailId",
|
|
||||||
principalTable: "PaymentDetails",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -4706,7 +4706,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
|||||||
b.Property<DateTime>("NextBillingDate")
|
b.Property<DateTime>("NextBillingDate")
|
||||||
.HasColumnType("datetime(6)");
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
b.Property<Guid?>("PaymentDetailId")
|
b.Property<Guid>("PaymentDetailId")
|
||||||
.HasColumnType("char(36)");
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
b.Property<Guid>("PlanId")
|
b.Property<Guid>("PlanId")
|
||||||
@ -6664,7 +6664,9 @@ namespace Marco.Pms.DataAccess.Migrations
|
|||||||
|
|
||||||
b.HasOne("Marco.Pms.Model.PaymentGetway.PaymentDetail", "PaymentDetail")
|
b.HasOne("Marco.Pms.Model.PaymentGetway.PaymentDetail", "PaymentDetail")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("PaymentDetailId");
|
.HasForeignKey("PaymentDetailId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("Marco.Pms.Model.TenantModels.SubscriptionPlanDetails", "Plan")
|
b.HasOne("Marco.Pms.Model.TenantModels.SubscriptionPlanDetails", "Plan")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
|
|||||||
@ -33,7 +33,7 @@ namespace Marco.Pms.Model.TenantModels
|
|||||||
public DateTime? CancellationDate { get; set; }
|
public DateTime? CancellationDate { get; set; }
|
||||||
public bool AutoRenew { get; set; } = true;
|
public bool AutoRenew { get; set; } = true;
|
||||||
public bool IsCancelled { get; set; } = false;
|
public bool IsCancelled { get; set; } = false;
|
||||||
public Guid? PaymentDetailId { get; set; }
|
public Guid PaymentDetailId { get; set; }
|
||||||
|
|
||||||
[ForeignKey("PaymentDetailId")]
|
[ForeignKey("PaymentDetailId")]
|
||||||
[ValidateNever]
|
[ValidateNever]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user