12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CrateTablePostLog extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('post_log', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->integer('uid')
- ->index('uid')
- ->unsigned()
- ->comment('uid');
- $table->integer('post_id')
- ->index('post_id')
- ->comment('内容id');
- $table->string('username', 32)
- ->default('')
- ->comment('操作人');
- $table->string('type', 32)
- ->default('add_data')
- ->comment('类型:add_data增加数据');
-
- $table->string('content', 500)
- ->default('')
- ->comment('内容');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('post_log');
- }
- }
|