Edit File: 2023_11_01_140411_create_wallets_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { public function up() { Schema::create('wallets', function (Blueprint $table) { $table->id(); $table->integer('walletable_id')->unsigned(); $table->string('walletable_type', 50); $table->decimal('balance', 15, 2)->default(0); $table->decimal('available_balance', 15, 2)->default(0); $table->decimal('debt_balance', 15, 2)->default(0); $table->timestamps(); }); } public function down() { Schema::dropIfExists('wallets'); } };
Back to File Manager