fix(rd21): guard career and job saves with durable revisions
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using JobTrackerApi.Data;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace JobTrackerApi.Migrations;
|
||||
|
||||
[DbContext(typeof(JobTrackerContext))]
|
||||
[Migration("20261023090000_AddJobRevision")]
|
||||
public partial class AddJobRevision : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder) => migrationBuilder.AddColumn<int>(
|
||||
name: "Version", table: "JobApplications",
|
||||
type: ActiveProvider.Contains("MySql", StringComparison.OrdinalIgnoreCase) ? "int" : "INTEGER",
|
||||
nullable: false, defaultValue: 1);
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
if (ActiveProvider.Contains("Sqlite", StringComparison.OrdinalIgnoreCase))
|
||||
migrationBuilder.Sql("ALTER TABLE \"JobApplications\" DROP COLUMN \"Version\";");
|
||||
else
|
||||
migrationBuilder.DropColumn(name: "Version", table: "JobApplications");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user