From 31ab6932fefc6cf62936b50e933fac2fd3611e14 Mon Sep 17 00:00:00 2001 From: Dhaverd Date: Thu, 21 Nov 2024 01:23:42 +0800 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D1=81=D1=82=D1=80=D1=83=D0=B3?= =?UTF-8?q?=D0=B0=D0=BB=20=D0=BC=D0=B8=D0=B3=D1=80=D0=B0=D1=86=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2024_11_15_190028_update_wishes_table.php | 29 +++++++++++++++++++ .../2024_11_20_171855_update_users_table.php | 28 ++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 database/migrations/2024_11_15_190028_update_wishes_table.php create mode 100644 database/migrations/2024_11_20_171855_update_users_table.php diff --git a/database/migrations/2024_11_15_190028_update_wishes_table.php b/database/migrations/2024_11_15_190028_update_wishes_table.php new file mode 100644 index 0000000..dae50dd --- /dev/null +++ b/database/migrations/2024_11_15_190028_update_wishes_table.php @@ -0,0 +1,29 @@ +unsignedBigInteger('book_user_id')->nullable(); + $table->foreign('book_user_id')->references('id')->on('users'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('wishes', function (Blueprint $table) { + $table->dropColumn('book_user_id'); + }); + } +}; diff --git a/database/migrations/2024_11_20_171855_update_users_table.php b/database/migrations/2024_11_20_171855_update_users_table.php new file mode 100644 index 0000000..79d86c8 --- /dev/null +++ b/database/migrations/2024_11_20_171855_update_users_table.php @@ -0,0 +1,28 @@ +string('name')->unique(true)->change(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->string('name')->unique(false)->change(); + }); + } +};