fix: 🗃️ set sites project_manager_id column to null on delete event

This commit is contained in:
Alexis Gousseau 2026-06-05 12:02:52 +02:00
parent 08637c882a
commit bab8de4200
No known key found for this signature in database
GPG key ID: 7F3C786EE12DBB72

View file

@ -19,7 +19,7 @@ return new class extends Migration
$table->string('url_re7')->unique()->nullable()->comment('Re7 url of the site.');
$table->string('url_prod')->unique()->nullable()->comment('Prod url of the site.');
$table->foreignId('project_manager_id')->nullable()->comment('Project manager associated.')
->constrained('users')->onUpdate('restrict')->onDelete('restrict');
->constrained('users')->onUpdate('restrict')->onDelete('set null');
$table->foreignId('gitlab_project_id')->unique()->comment('Gitlab id of the gitlab project.')
->constrained('gitlab_projects')->onUpdate('restrict')->onDelete('restrict');
$table->timestamp('created_at')->nullable()->comment('Date the site was created.');