<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateUserAccountsTable extends Migration
{

    /**
     * Run the migrations.
     * @return void
     */
    public function up()
    {
        Schema::create('user_accounts', function (Blueprint $table) {
            $table->unsignedBigInteger('user_id')->primary();
            $table->decimal('balance', 20, 2)->default(0);
            $table->decimal('score', 20, 2)->default(0);
            $table->decimal('coins', 20, 2)->default(0);
            $table->decimal('other', 20, 2)->default(0);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_accounts');
    }

}
