fix(timetable): null-on-delete advance_submissions per RFC §5.4 retention

advance_submissions.advance_section_id FK changed from cascadeOnDelete
to nullOnDelete; column made nullable. Aligns implementation with
RFC v0.2 §5.4 audit-immutability ("submissions remain for retention
compliance") — when ArtistEngagementObserver::deleted hard-deletes a
section, its submissions persist as orphans rather than disappearing.

Migration edited in place (branch unpushed, dev-only). Observer
docblock + test assertion updated to match. Removed pre-existing
follow-up comment that documented the deviation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-08 19:42:36 +02:00
parent e43dd60756
commit a5190ee309
4 changed files with 20 additions and 14 deletions

View File

@@ -12,7 +12,7 @@ return new class extends Migration
{
Schema::create('advance_submissions', function (Blueprint $table) {
$table->ulid('id')->primary();
$table->foreignUlid('advance_section_id')->constrained()->cascadeOnDelete();
$table->foreignUlid('advance_section_id')->nullable()->constrained()->nullOnDelete();
$table->string('submitted_by_name');
$table->string('submitted_by_email');
$table->timestamp('submitted_at');