up()
up() : void
Run the migrations.
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateProblemsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('problems', function(Blueprint $table)
{
$table->integer('id', true);
$table->string('title')->nullable();
$table->integer('submited')->unsigned()->nullable()->default(0);
$table->integer('difficulty')->unsigned()->nullable()->default(0);
$table->timestamps();
$table->integer('accepted')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('problems');
}
}