feat/Update_Controllers_to_Allow_for_Premium_Membership

This commit is contained in:
cesnimda
2026-08-03 09:17:28 +02:00
parent de937d25dc
commit c3f4a57195
187 changed files with 26062 additions and 991 deletions
@@ -0,0 +1,49 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace JobTrackerApi.Migrations
{
/// <inheritdoc />
public partial class AddAiPrivacyPreferences : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
if (ActiveProvider.Contains("MySql", System.StringComparison.OrdinalIgnoreCase))
{
migrationBuilder.Sql("ALTER TABLE `AspNetUsers` ADD COLUMN `AiEnabled` tinyint(1) NOT NULL DEFAULT 1;");
migrationBuilder.Sql("ALTER TABLE `AspNetUsers` ADD COLUMN `ExternalAiProcessingAllowed` tinyint(1) NOT NULL DEFAULT 0;");
}
else
{
// Preserve existing AI behaviour while external processing remains opt-in.
migrationBuilder.AddColumn<bool>(
name: "AiEnabled",
table: "AspNetUsers",
type: "INTEGER",
nullable: false,
defaultValue: true);
migrationBuilder.AddColumn<bool>(
name: "ExternalAiProcessingAllowed",
table: "AspNetUsers",
type: "INTEGER",
nullable: false,
defaultValue: false);
}
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AiEnabled",
table: "AspNetUsers");
migrationBuilder.DropColumn(
name: "ExternalAiProcessingAllowed",
table: "AspNetUsers");
}
}
}