mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 04:20:49 +08:00
44 lines
1.1 KiB
PHP
44 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateExamsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
if (Schema::hasTable('exams')) {
|
|
return;
|
|
}
|
|
Schema::create('exams', function (Blueprint $table) {
|
|
$table->bigIncrements('id');
|
|
$table->string('name');
|
|
$table->text('description')->nullable();
|
|
$table->dateTime('begin')->nullable();
|
|
$table->dateTime('end')->nullable();
|
|
$table->integer('duration')->default(0);
|
|
$table->text('filters')->nullable();
|
|
$table->text('indexes');
|
|
$table->tinyInteger('status')->default(0);
|
|
$table->tinyInteger('is_discovered')->default(0);
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('exams');
|
|
}
|
|
}
|