<?php

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

class AddVatNumberToCashtransactionsAndStocktransactions extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('cashtransactions', function (Blueprint $table) {
            $table->string('vat_number')->nullable();
        });

        Schema::table('stocktransactions', function (Blueprint $table) {
            $table->string('vat_number')->nullable()->after('vat_base');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('cashtransactions', function (Blueprint $table) {
            $table->dropColumn('vat_number');
        });

        Schema::table('stocktransactions', function (Blueprint $table) {
            $table->dropColumn('vat_number');
        });
    }
}
