From 44b907818f36f36b6912493cdb8d4612ab9c5500 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Sat, 14 Jan 2023 18:05:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=20=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...8_30_081930_add_balance_to_users_table.php | 4 +- ...22_09_13_191255_add_banned_at_to_users.php | 2 +- ...200343_rename_balances_column_to_users.php | 37 ------------------- 3 files changed, 3 insertions(+), 40 deletions(-) delete mode 100644 database/migrations/2023_01_07_200343_rename_balances_column_to_users.php diff --git a/database/migrations/2022_08_30_081930_add_balance_to_users_table.php b/database/migrations/2022_08_30_081930_add_balance_to_users_table.php index f68e23d..9ffa7b5 100644 --- a/database/migrations/2022_08_30_081930_add_balance_to_users_table.php +++ b/database/migrations/2022_08_30_081930_add_balance_to_users_table.php @@ -14,7 +14,7 @@ public function up(): void { Schema::table('users', function (Blueprint $table) { // - $table->decimal('balances', 10)->default(0)->after('password'); + $table->decimal('balance', 10)->default(0)->after('password'); // drop column if exists if (Schema::hasColumn('users', 'drops')) { @@ -32,7 +32,7 @@ public function down(): void { Schema::table('users', function (Blueprint $table) { // - $table->dropColumn('balances'); + $table->dropColumn('balance'); }); } }; diff --git a/database/migrations/2022_09_13_191255_add_banned_at_to_users.php b/database/migrations/2022_09_13_191255_add_banned_at_to_users.php index 7d7cbe1..6d14474 100644 --- a/database/migrations/2022_09_13_191255_add_banned_at_to_users.php +++ b/database/migrations/2022_09_13_191255_add_banned_at_to_users.php @@ -14,7 +14,7 @@ public function up(): void { Schema::table('users', function (Blueprint $table) { // - $table->dateTime('banned_at')->nullable()->comment('封禁时间')->after('balances'); + $table->dateTime('banned_at')->nullable()->comment('封禁时间')->after('balance'); // reason $table->string('banned_reason')->nullable()->after('banned_at'); }); diff --git a/database/migrations/2023_01_07_200343_rename_balances_column_to_users.php b/database/migrations/2023_01_07_200343_rename_balances_column_to_users.php deleted file mode 100644 index 66e6afa..0000000 --- a/database/migrations/2023_01_07_200343_rename_balances_column_to_users.php +++ /dev/null @@ -1,37 +0,0 @@ -renameColumn('balances', 'balance'); - } - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down(): void - { - Schema::table('users', function (Blueprint $table) { - if (Schema::hasColumn('users', 'balance')) { - $table->renameColumn('balance', 'balances'); - } - }); - } -};