From d3aacf2aaa5327c4800cb66623c3cee46af3f935 Mon Sep 17 00:00:00 2001 From: hmdee <32852463+hmdee@users.noreply.github.com> Date: Fri, 8 Nov 2024 00:12:21 +0200 Subject: [PATCH] Update 2021_11_09_075928_add_surname_to_users_table.php --- .../task2/2021_11_09_075928_add_surname_to_users_table.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/database/migrations/task2/2021_11_09_075928_add_surname_to_users_table.php b/database/migrations/task2/2021_11_09_075928_add_surname_to_users_table.php index 5a3422a4..efa8aebc 100644 --- a/database/migrations/task2/2021_11_09_075928_add_surname_to_users_table.php +++ b/database/migrations/task2/2021_11_09_075928_add_surname_to_users_table.php @@ -16,6 +16,7 @@ public function up() Schema::table('users', function (Blueprint $table) { // TASK: Add a string field "surname" which would go after the field "name" // Write code here + $table->string('surname')->after('name'); }); } @@ -27,6 +28,7 @@ public function up() public function down() { Schema::table('users', function (Blueprint $table) { + $table->dropColumn('surname'); // }); }