diff --git a/database/migrations/task10/2021_11_09_090858_create_visitors_table.php b/database/migrations/task10/2021_11_09_090858_create_visitors_table.php index 7a53968c..08e7516e 100644 --- a/database/migrations/task10/2021_11_09_090858_create_visitors_table.php +++ b/database/migrations/task10/2021_11_09_090858_create_visitors_table.php @@ -16,7 +16,7 @@ public function up() // TASK: edit this migration so country_id would allow NULL values Schema::create('visitors', function (Blueprint $table) { $table->id(); - $table->foreignId('country_id')->constrained(); + $table->foreignId('country_id')->nullable()->constrained(); $table->string('ip_address'); $table->timestamps(); });