<?php

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

class CreateCompanyCurrenciesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('company_currencies', function (Blueprint $table) {
            $table->id();
            $table->string('name', 50)->nullable();
            $table->string('symbol', 10)->nullable();
            $table->string('abbr', 20)->nullable();
            $table->string('type', 20)->nullable();
            $table->string('conversion_rate', 20)->nullable();
            $table->boolean('status')->default(true);
            $table->boolean('deleted')->default(false);
            $table->string('deleted_by',10)->nullable();
            $table->softDeletes();
            $table->string('created_by',10)->nullable();
            $table->timestamps();
        });
    }

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