using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Apimanager_backend.Migrations
{
///
public partial class add_paymentconfig_url : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_PaymentConfig",
table: "PaymentConfig");
migrationBuilder.RenameTable(
name: "PaymentConfig",
newName: "paymentConfigs");
migrationBuilder.AddColumn(
name: "Url",
table: "paymentConfigs",
type: "longtext",
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddPrimaryKey(
name: "PK_paymentConfigs",
table: "paymentConfigs",
column: "Id");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: -1,
column: "CreatedAt",
value: new DateTime(2025, 7, 31, 7, 40, 33, 590, DateTimeKind.Utc).AddTicks(5484));
migrationBuilder.UpdateData(
table: "paymentConfigs",
keyColumn: "Id",
keyValue: 1,
column: "Url",
value: null);
migrationBuilder.UpdateData(
table: "paymentConfigs",
keyColumn: "Id",
keyValue: 2,
column: "Url",
value: null);
migrationBuilder.UpdateData(
table: "paymentConfigs",
keyColumn: "Id",
keyValue: 3,
column: "Url",
value: null);
migrationBuilder.UpdateData(
table: "paymentConfigs",
keyColumn: "Id",
keyValue: 4,
column: "Url",
value: null);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_paymentConfigs",
table: "paymentConfigs");
migrationBuilder.DropColumn(
name: "Url",
table: "paymentConfigs");
migrationBuilder.RenameTable(
name: "paymentConfigs",
newName: "PaymentConfig");
migrationBuilder.AddPrimaryKey(
name: "PK_PaymentConfig",
table: "PaymentConfig",
column: "Id");
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: -1,
column: "CreatedAt",
value: new DateTime(2025, 7, 31, 6, 10, 31, 712, DateTimeKind.Utc).AddTicks(1486));
}
}
}