<?php

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

class AddColumnDeveloperTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('developers', function (Blueprint $table) {
            if (!Schema::hasColumn('developers', 'birthday')) {
                $table->string('birthday')->nullable();
            }

            if (!Schema::hasColumn('developers', 'build')) {
                $table->string('build')->nullable();
            }

            if (!Schema::hasColumn('developers', 'being_built')) {
                $table->string('being_built')->nullable();
            }
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
