1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateTableDownloads extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('downloads', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->integer('uid')
- ->unsigned()
- ->comment('用户uid');
- $table->string('username', 32)
- ->default('')
- ->comment('用户昵称');
- $table->string('download_type', 32)
- ->default('post')
- ->comment('类型:post内容,post_waste内容回收站');
- $table->tinyInteger('download_status')
- ->default(0)
- ->comment('状态:0生成中,1成功,2失败');
- $table->mediumText('params')
- ->comment('参数');
- $table->string('url', 255)
- ->default('')
- ->comment('下载地址');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('downloads');
- }
- }
|