<?php

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

class AddVersionToArrahnMasterDbTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        $value = 'v1';

        Schema::table('arrahn_master_db', function (Blueprint $table) use($value) {
            $table->char('version', 4)->default($value);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::connection('mysql7')->table('arrahn_master_db', function (Blueprint $table) {
            $table->dropColumn(['version']);
        });
    }
}
