<?php namespace NetSTI\System\Updates;

use Schema;
use October\Rain\Database\Updates\Migration;

class CreateCategoriesTable extends Migration
{

    public function up()
    {
        Schema::create('netsti_system_categories', function($table)
        {
            $table->engine = 'InnoDB';
            $table->increments('id');
            $table->string('name')->nullable();
            $table->string('slug')->index()->unique();
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::dropIfExists('netsti_system_categories');
    }

}
