feat: switch balance to double

This commit is contained in:
b1ek 2024-09-17 23:03:04 +10:00
parent 7eae435a50
commit 1f65330a73
Signed by: blek
GPG Key ID: A622C22C9BC616B2
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('balance');
$table->double('balance')->default(0);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('balance');
$table->bigInteger('balance')->default(0);
});
}
};