diff --git a/database/migrations/2026_04_30_160235_create_sites_table.php b/database/migrations/2026_04_30_160235_create_sites_table.php index 9c448b6..64036cf 100644 --- a/database/migrations/2026_04_30_160235_create_sites_table.php +++ b/database/migrations/2026_04_30_160235_create_sites_table.php @@ -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.');