<?php

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

class CreateEmailSettingsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('email_settings', function (Blueprint $table) {
            $table->increments('id');
            $table->string('email');
            $table->string('name')->nullable();
            $table->string('server');
            $table->string('port')->default('143');
            $table->enum('protocol', ['imap', 'pop3'])->default('imap');
            $table->string('username');
            $table->string('password');
            $table->enum('booking_type', ['support', 'repair', 'onsite', 'sale_lead'])->default('support');
            $table->timestamps();
        });
    }

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