<?php

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

class CreateSubscriptionTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('subscriptions', function (Blueprint $table) {
            $table->id();
            $table->string('bank_name_from', 100);
            $table->string('bank_name_to', 100);
            $table->string('email', 100);
            $table->string('owner_name', 100);
            $table->string('account_no', 100);
            $table->string('amount', 10);
            $table->date('trans_date');
            $table->string('trans_document', 200)->nullable();
            $table->boolean('terms')->default(0);

            $table->softDeletes();
            $table->timestamps();

            $table->engine = 'InnoDB';
        });
    }

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