123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateCourseAttachesTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('course_attaches', function (Blueprint $table) {
- $table->id();
- $table->integer('course_id')->default(0);
- $table->integer('course_video_id')->default(0);
- $table->string('name')->default('')->comment('附件名');
- $table->string('path', 500)->default('')->comment('路径');
- $table->string('disk', 12)->default('')->comment('存储磁盘');
- $table->integer('size')->default(0)->comment('单位:byte');
- $table->string('extension', 12)->default('')->comment('文件格式');
- $table->integer('download_times')->default(0)->comment('下载次数');
- $table->integer('sort')->default(0);
- $table->tinyInteger('status')->default(1)->comment('是否显示,1显示,0不显示');
- $table->softDeletes();
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('course_attaches');
- }
- }
|