| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateFileTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('files', function (Blueprint $table) {
- $table->increments('id');
- $table->string('path', 255)->default('')->comment('path');
- $table->string('category')->default('')->comment('category: article, file');
- $table->string('extension', 255)->default('')->comment('extension');
- $table->integer('updated_at');
- $table->integer('created_at');
- $table->integer('deleted_at')->nullable();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('files');
- }
- }
|