using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace PowderCoating.Infrastructure.Migrations { /// public partial class AddStripeWebhookEvents : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "StripeWebhookEvents", columns: table => new { Id = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), EventId = table.Column(type: "nvarchar(max)", nullable: false), EventType = table.Column(type: "nvarchar(max)", nullable: false), CompanyId = table.Column(type: "int", nullable: true), RawJson = table.Column(type: "nvarchar(max)", nullable: false), Status = table.Column(type: "int", nullable: false), ErrorMessage = table.Column(type: "nvarchar(max)", nullable: true), ReceivedAt = table.Column(type: "datetime2", nullable: false), ProcessedAt = table.Column(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)); } /// 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)); } } }