up()
up() : void
Run the migrations.
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateContestsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('contests', function(Blueprint $table)
{
$table->integer('id', true);
$table->string('title')->nullable();
$table->dateTime('start_time')->nullable();
$table->dateTime('end_time')->nullable();
$table->string('password')->nullable();
$table->integer('type')->unsigned()->nullable()->default(0);
$table->string('classes')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('contests');
}
}