Files
hamkadr/src/JobsMedical.Web/Migrations/20260603140343_AiSettingsAndAutomation.cs
T

45 lines
2.0 KiB
C#
Raw Normal View History

using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace JobsMedical.Web.Migrations
{
/// <inheritdoc />
public partial class AiSettingsAndAutomation : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AppSettings",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Mode = table.Column<int>(type: "integer", nullable: false),
AutoPublishMinConfidence = table.Column<int>(type: "integer", nullable: false),
AiEnabled = table.Column<bool>(type: "boolean", nullable: false),
AiEndpoint = table.Column<string>(type: "character varying(500)", maxLength: 500, nullable: true),
AiApiKey = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
AiModel = table.Column<string>(type: "character varying(120)", maxLength: 120, nullable: true),
AiSystemPrompt = table.Column<string>(type: "character varying(4000)", maxLength: 4000, nullable: false),
AiAutoApprove = table.Column<bool>(type: "boolean", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AppSettings", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AppSettings");
}
}
}