<?php 

use Server\Database\Migrations\ParentMigration;
use Illuminate\Database\Schema\Blueprint;

class CreatePricesTable extends ParentMigration {

    public function up() {
        $this->schema->create('prices', function(Blueprint $table) {
            $table->increments('id');
            $table->float('price_min');
            $table->float('price_max')->nullable();
            $table->string('title')->default('');
            $table->string('theme')->default('');
            $table->string('comment')->default('');
            $table->enum('type', ['Trading', 'Mining'])->default('Trading');
            $table->timestamps();
        });
    }

    public function down() {
        $this->schema->drop('prices');
    }
}