<?php

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

class CreateCMSContentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::connection('mysql_stern')->create('c_m_s_contents', function (Blueprint $table) {
            $table->increments('id');

            $table->string('name');
            $table->string('slug')->index()->unique();

            $table->string('field', 10)->index();

            $table->string('text')->nullable();
            $table->text('full_text')->nullable();
            $table->integer('integer')->nullable();
            $table->decimal('decimal')->nullable();

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::connection('mysql_stern')->dropIfExists('c_m_s_contents');
    }
}

