From 955ce57239f2de6e15d8e5f9e7e2709995bd75a2 Mon Sep 17 00:00:00 2001 From: anne-maina Date: Wed, 13 Nov 2024 15:15:26 +0300 Subject: [PATCH] changed migrations --- ...2021_11_09_083225_recreate_users_table.php | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/database/migrations/task5/2021_11_09_083225_recreate_users_table.php b/database/migrations/task5/2021_11_09_083225_recreate_users_table.php index 6b15a7c6..e802796b 100644 --- a/database/migrations/task5/2021_11_09_083225_recreate_users_table.php +++ b/database/migrations/task5/2021_11_09_083225_recreate_users_table.php @@ -1,5 +1,6 @@ id(); - $table->string('name'); - $table->string('email')->unique(); - $table->timestamp('email_verified_at')->nullable(); - $table->string('password'); - $table->rememberToken(); - $table->timestamps(); - }); + + if(!Schema::hasTable('users')) { + Schema::create('users', function (Blueprint $table) { + $table->id(); + $table->string('name'); + $table->string('email')->unique(); + $table->timestamp('email_verified_at')->nullable(); + $table->string('password'); + $table->rememberToken(); + $table->timestamps(); + }); + } } /**