1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateResourceTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('resources', function (Blueprint $table) {
- $table->id();
- $table->string('name')->nullable()->comment('文件名');
- $table->string('original_name')->nullable()->comment('原文件名');
- $table->string('path')->nullable()->comment('路径');
- $table->string('disk', 50)->nullable()->comment('disk');
- $table->string('url', 300)->nullable()->comment('url');
- $table->integer('size')->default(0)->comment('大小');
- $table->tinyInteger('status')->default(0)->unsigned()->comment('状态');
- $table->softDeletes();
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('resource');
- }
- }
|