You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.2 KiB

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateStudiesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('studies', function (Blueprint $table) {
$table->increments('id');
$table->integer('admin_id')->comment('不用填')->nullable();
$table->integer('department_id')->comment('不用填')->nullable();
$table->string('name')->comment('名称');
$table->integer('expire_day')->comment('有效天数')->nullable();
$table->integer('minute')->comment('最低学习分钟数')->nullable();
$table->decimal('rate')->comment('通过正确率')->nullable();
$table->mediumText('content')->comment('内容')->nullable();
$table->json('file')->comment('文件id数组')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('studies');
}
}