feat(church-profile): add AI provider/model/key columns + migration
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,76 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace ROLAC.API.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddChurchAiSettings : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "AiProvider",
|
||||
table: "ChurchProfiles",
|
||||
type: "character varying(20)",
|
||||
maxLength: 20,
|
||||
nullable: false,
|
||||
defaultValue: "Claude");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ClaudeApiKey",
|
||||
table: "ChurchProfiles",
|
||||
type: "character varying(500)",
|
||||
maxLength: 500,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ClaudeModel",
|
||||
table: "ChurchProfiles",
|
||||
type: "character varying(100)",
|
||||
maxLength: 100,
|
||||
nullable: true,
|
||||
defaultValue: "claude-haiku-4-5-20251001");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "GeminiApiKey",
|
||||
table: "ChurchProfiles",
|
||||
type: "character varying(500)",
|
||||
maxLength: 500,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "GeminiModel",
|
||||
table: "ChurchProfiles",
|
||||
type: "character varying(100)",
|
||||
maxLength: 100,
|
||||
nullable: true,
|
||||
defaultValue: "gemini-2.5-flash-lite");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AiProvider",
|
||||
table: "ChurchProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ClaudeApiKey",
|
||||
table: "ChurchProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ClaudeModel",
|
||||
table: "ChurchProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GeminiApiKey",
|
||||
table: "ChurchProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "GeminiModel",
|
||||
table: "ChurchProfiles");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -439,6 +439,13 @@ namespace ROLAC.API.Migrations
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("character varying(500)");
|
||||
|
||||
b.Property<string>("AiProvider")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("character varying(20)")
|
||||
.HasDefaultValue("Claude");
|
||||
|
||||
b.Property<string>("BankAccountNumber")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
@@ -455,6 +462,16 @@ namespace ROLAC.API.Migrations
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("character varying(100)");
|
||||
|
||||
b.Property<string>("ClaudeApiKey")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("character varying(500)");
|
||||
|
||||
b.Property<string>("ClaudeModel")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("character varying(100)")
|
||||
.HasDefaultValue("claude-haiku-4-5-20251001");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
@@ -467,6 +484,16 @@ namespace ROLAC.API.Migrations
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("character varying(200)");
|
||||
|
||||
b.Property<string>("GeminiApiKey")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("character varying(500)");
|
||||
|
||||
b.Property<string>("GeminiModel")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("character varying(100)")
|
||||
.HasDefaultValue("gemini-2.5-flash-lite");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
|
||||
Reference in New Issue
Block a user