12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CrateTablePostImgs extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('post_imgs', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->integer('post_id')
- ->index('post_id')
- ->comment('内容id');
- $table->string('img', 255)
- ->default('')
- ->comment('图片');
- $table->softDeletes();
-
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('post_imgs');
- }
- }
|