51 lines
1.6 KiB
C#
51 lines
1.6 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Marco.Pms.DataAccess.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Added_PaymentDetails_In_TenantSubscription_Table : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "PaymentDetailId",
|
|
table: "TenantSubscriptions",
|
|
type: "char(36)",
|
|
nullable: true,
|
|
collation: "ascii_general_ci");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_TenantSubscriptions_PaymentDetailId",
|
|
table: "TenantSubscriptions",
|
|
column: "PaymentDetailId");
|
|
|
|
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.DropIndex(
|
|
name: "IX_TenantSubscriptions_PaymentDetailId",
|
|
table: "TenantSubscriptions");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PaymentDetailId",
|
|
table: "TenantSubscriptions");
|
|
}
|
|
}
|
|
}
|