<?php

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

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

    }

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

    }
}
