using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace foodmarket.Infrastructure.Persistence.Migrations
{
/// Глобальные настройки платформы (single-row): ArchiveRetentionDays
/// (по умолчанию 30) — сколько дней архивная орга должна пробыть в архиве
/// прежде чем её можно удалить навсегда. Юзер настраивает через UI
/// /super-admin/settings; раньше был хардкод 30 в SuperAdminOrganizationsController.
public partial class Phase4e_SystemSettings : Migration
{
protected override void Up(MigrationBuilder b)
{
b.CreateTable(
name: "system_settings",
schema: "public",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
ArchiveRetentionDays = table.Column(type: "integer", nullable: false, defaultValue: 30),
CreatedAt = table.Column(type: "timestamp with time zone", nullable: false),
UpdatedAt = table.Column(type: "timestamp with time zone", nullable: true),
},
constraints: table => table.PrimaryKey("PK_system_settings", x => x.Id));
}
protected override void Down(MigrationBuilder b)
{
b.DropTable(name: "system_settings", schema: "public");
}
}
}