<?php

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

class CreateCompaniesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('companies', function (Blueprint $table) {
            $table->increments('id');
            $table->timestamps();
            $table->softDeletes();
            $table->string('name');
            $table->longText('contacts');
            $table->longText('location');
            $table->longText('preferences');
			$table->longText('configs');
			$table->tinyInteger('send_visit_info_by_email')->default(1);
			$table->tinyInteger('generate_invoices_automatically')->default(0);
			$table->tinyInteger('enable_automatic_payments')->default(0);
			$table->text('social_media')->nullable();
			$table->text('stripe_id')->nullable();
			$table->text('stripe_plan_id')->nullable();
			$table->tinyInteger('active')->default(1);
        });
    }

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