Files
PowderCoatingLogix/src/PowderCoating.Infrastructure/Migrations/20260403000650_AddStripeWebhookEvents.cs
T
2026-04-23 21:38:24 -04:00

85 lines
3.3 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PowderCoating.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class AddStripeWebhookEvents : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "StripeWebhookEvents",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
EventId = table.Column<string>(type: "nvarchar(max)", nullable: false),
EventType = table.Column<string>(type: "nvarchar(max)", nullable: false),
CompanyId = table.Column<int>(type: "int", nullable: true),
RawJson = table.Column<string>(type: "nvarchar(max)", nullable: false),
Status = table.Column<int>(type: "int", nullable: false),
ErrorMessage = table.Column<string>(type: "nvarchar(max)", nullable: true),
ReceivedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
ProcessedAt = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_StripeWebhookEvents", x => x.Id);
});
migrationBuilder.UpdateData(
table: "PricingTiers",
keyColumn: "Id",
keyValue: 1,
column: "CreatedAt",
value: new DateTime(2026, 4, 3, 0, 6, 46, 778, DateTimeKind.Utc).AddTicks(3905));
migrationBuilder.UpdateData(
table: "PricingTiers",
keyColumn: "Id",
keyValue: 2,
column: "CreatedAt",
value: new DateTime(2026, 4, 3, 0, 6, 46, 778, DateTimeKind.Utc).AddTicks(3912));
migrationBuilder.UpdateData(
table: "PricingTiers",
keyColumn: "Id",
keyValue: 3,
column: "CreatedAt",
value: new DateTime(2026, 4, 3, 0, 6, 46, 778, DateTimeKind.Utc).AddTicks(3913));
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "StripeWebhookEvents");
migrationBuilder.UpdateData(
table: "PricingTiers",
keyColumn: "Id",
keyValue: 1,
column: "CreatedAt",
value: new DateTime(2026, 4, 2, 22, 49, 46, 35, DateTimeKind.Utc).AddTicks(4841));
migrationBuilder.UpdateData(
table: "PricingTiers",
keyColumn: "Id",
keyValue: 2,
column: "CreatedAt",
value: new DateTime(2026, 4, 2, 22, 49, 46, 35, DateTimeKind.Utc).AddTicks(4847));
migrationBuilder.UpdateData(
table: "PricingTiers",
keyColumn: "Id",
keyValue: 3,
column: "CreatedAt",
value: new DateTime(2026, 4, 2, 22, 49, 46, 35, DateTimeKind.Utc).AddTicks(4849));
}
}
}