using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace PowderCoating.Infrastructure.Migrations { /// public partial class AddGracePeriodAppliesToTrials : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.Sql(""" IF NOT EXISTS (SELECT 1 FROM [PlatformSettings] WHERE [Key] = N'GracePeriodAppliesToTrials') BEGIN INSERT INTO [PlatformSettings] ([Key], [Value], [Label], [Description], [GroupName]) VALUES (N'GracePeriodAppliesToTrials', N'false', N'Grace Period Applies to Trials', N'When false (default), trial accounts (no Stripe subscription) are locked out immediately when their trial expires — no grace period. Enable to give trial accounts the same grace period as paid accounts.', N'Subscriptions'); END """); migrationBuilder.UpdateData( table: "PricingTiers", keyColumn: "Id", keyValue: 1, column: "CreatedAt", value: new DateTime(2026, 5, 5, 19, 13, 29, 537, DateTimeKind.Utc).AddTicks(4011)); migrationBuilder.UpdateData( table: "PricingTiers", keyColumn: "Id", keyValue: 2, column: "CreatedAt", value: new DateTime(2026, 5, 5, 19, 13, 29, 537, DateTimeKind.Utc).AddTicks(4019)); migrationBuilder.UpdateData( table: "PricingTiers", keyColumn: "Id", keyValue: 3, column: "CreatedAt", value: new DateTime(2026, 5, 5, 19, 13, 29, 537, DateTimeKind.Utc).AddTicks(4021)); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.Sql("DELETE FROM [PlatformSettings] WHERE [Key] = N'GracePeriodAppliesToTrials'"); migrationBuilder.UpdateData( table: "PricingTiers", keyColumn: "Id", keyValue: 1, column: "CreatedAt", value: new DateTime(2026, 5, 5, 16, 17, 52, 780, DateTimeKind.Utc).AddTicks(8281)); migrationBuilder.UpdateData( table: "PricingTiers", keyColumn: "Id", keyValue: 2, column: "CreatedAt", value: new DateTime(2026, 5, 5, 16, 17, 52, 780, DateTimeKind.Utc).AddTicks(8287)); migrationBuilder.UpdateData( table: "PricingTiers", keyColumn: "Id", keyValue: 3, column: "CreatedAt", value: new DateTime(2026, 5, 5, 16, 17, 52, 780, DateTimeKind.Utc).AddTicks(8289)); } } }