Files
nexusphp/database/migrations/2021_04_19_061650_create_exams_table.php
T

39 lines
869 B
PHP
Raw Normal View History

2021-04-02 19:48:41 +08:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
2021-04-19 20:13:21 +08:00
class CreateExamsTable extends Migration
2021-04-02 19:48:41 +08:00
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
2021-04-19 20:13:21 +08:00
Schema::create('exams', function (Blueprint $table) {
2021-04-02 19:48:41 +08:00
$table->id();
$table->string('name');
2021-04-19 20:13:21 +08:00
$table->text('description')->nullable();
$table->dateTime('begin');
$table->dateTime('end');
$table->text('filters');
$table->text('requires');
$table->tinyInteger('status')->default(0);
2021-04-02 19:48:41 +08:00
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
2021-04-19 20:13:21 +08:00
Schema::dropIfExists('exams');
2021-04-02 19:48:41 +08:00
}
}