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 new file mode 100644 index 0000000..66e6afa --- /dev/null +++ b/database/migrations/2023_01_07_200343_rename_balances_column_to_users.php @@ -0,0 +1,37 @@ +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'); + } + }); + } +};