using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace CMSMicroservice.Infrastructure.Persistence.Migrations
{
    /// <inheritdoc />
    public partial class AddPackagePurchaseMethod : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<int>(
                name: "PackagePurchaseMethod",
                schema: "CMS",
                table: "Users",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "BankReferenceId",
                schema: "CMS",
                table: "UserCommissionPayouts",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "BankTrackingCode",
                schema: "CMS",
                table: "UserCommissionPayouts",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "PaymentFailureReason",
                schema: "CMS",
                table: "UserCommissionPayouts",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "PurchaseMethod",
                schema: "CMS",
                table: "ClubMemberships",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "PackagePurchaseMethod",
                schema: "CMS",
                table: "Users");

            migrationBuilder.DropColumn(
                name: "BankReferenceId",
                schema: "CMS",
                table: "UserCommissionPayouts");

            migrationBuilder.DropColumn(
                name: "BankTrackingCode",
                schema: "CMS",
                table: "UserCommissionPayouts");

            migrationBuilder.DropColumn(
                name: "PaymentFailureReason",
                schema: "CMS",
                table: "UserCommissionPayouts");

            migrationBuilder.DropColumn(
                name: "PurchaseMethod",
                schema: "CMS",
                table: "ClubMemberships");
        }
    }
}
