Task 2 - no relationship

This commit is contained in:
PovilasKorop
2021-11-22 07:26:10 +02:00
parent 2d87c1255c
commit 9c71409ffc
7 changed files with 36 additions and 84 deletions
@@ -16,7 +16,7 @@ class CreateTasksTable extends Migration
Schema::create('tasks', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->unsignedBigInteger('users_id');
$table->unsignedBigInteger('users_id')->nullable();
$table->foreign('users_id')->references('id')->on('users');
$table->timestamps();
});