12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateCardBannerTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('card_banner', function (Blueprint $table) {
- $table->increments('id');
- $table->string('user_id');
- $table->string('pic')->default('')->comment('图片');
- $table->integer('sort')->default(0)->comment('排序号');
- $table->enum('status',['显示','显示'])->default('显示')->comment('轮播图状态');
- $table->timestamps();
- $table->index('user_id');
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('card_banner');
- }
- }
|