File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class CreateEventsTable extends Migration
1717 $table->date('start_date');
1818 $table->date('end_date');
1919 $table->boolean('registration_form');
20- $table->foreignId('image_id')->nullable();
20+ $table->foreignId('image_id')->nullable()->constrained('files')->nullOnDelete() ;
2121 $table->json('status')->default(new Expression('(JSON_OBJECT())'));
2222 $table->json('title')->default(new Expression('(JSON_OBJECT())'));
2323 $table->json('slug')->default(new Expression('(JSON_OBJECT())'));
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class CreateRegistrationsTable extends Migration
1414 Schema::create('registrations', function (Blueprint $table) {
1515 $table->id();
1616 $table->foreignId('event_id')->constrained();
17- $table->foreignId('user_id')->nullable();
17+ $table->foreignId('user_id')->nullable()->constrained()->nullOnDelete() ;
1818 $table->unsignedInteger('number_of_people');
1919 $table->string('email')->nullable();
2020 $table->string('first_name')->nullable();
You can’t perform that action at this time.
0 commit comments