diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 094c026b..e2e3c824 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -34,7 +34,7 @@ public function up(): void $table->string('contact_name')->nullable(); $table->string('contact_phone')->nullable(); $table->integer('nb_children')->nullable(); - $table->foreignId('parent_id')->nullable(); + $table->foreignId('parent_id')->nullable()->constrained(); $table->timestamps(); }); }