Compare commits

..

No commits in common. "e78f0a6faef62a79bc340b0217d7603ac7d196e1" and "7eae435a50c0cb7e822dd8f1d6634b72dfb5f472" have entirely different histories.

2 changed files with 1 additions and 31 deletions

View File

@ -26,7 +26,7 @@ class AddBalance extends Command
*/ */
public function handle() public function handle()
{ {
$balance = (double) $this->argument('balance'); $balance = (int) $this->argument('balance');
$id = (int) $this->argument('id'); $id = (int) $this->argument('id');
if ($balance == 0 || $id == 0) { if ($balance == 0 || $id == 0) {
$this->fail('Balance or Id must be non zero value!'); $this->fail('Balance or Id must be non zero value!');

View File

@ -1,30 +0,0 @@
<?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);
});
}
};