From 890399dd7402ba911c1b6c85fd1a24f8708a3d02 Mon Sep 17 00:00:00 2001 From: James Collins Date: Mon, 8 May 2023 12:20:57 +1000 Subject: [PATCH] set default first/last name --- .../2023_05_08_021929_update_users_table.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 database/migrations/2023_05_08_021929_update_users_table.php diff --git a/database/migrations/2023_05_08_021929_update_users_table.php b/database/migrations/2023_05_08_021929_update_users_table.php new file mode 100644 index 0000000..744ca60 --- /dev/null +++ b/database/migrations/2023_05_08_021929_update_users_table.php @@ -0,0 +1,34 @@ +string('first_name')->default('')->change(); + $table->string('last_name')->default('')->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->string('first_name')->nullable(false)->change(); + $table->string('last_name')->nullable(false)->change(); + }); + } +};