1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateBannersTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('banners', function (Blueprint $table) {
- $table->id();
- $table->string('name')->comment('标题');
- $table->string('path')->comment('地址');
- $table->string('shop_ids')->nullable()->comment('站点ids');
- $table->tinyInteger('type')->default(0)->comment('类型');
- $table->string('data', 500)->nullable()->comment('数据');
- $table->timestamp('start_time')->nullable()->comment('开始时间');
- $table->timestamp('end_time')->nullable()->comment('结束时间');
- $table->tinyInteger('status')->default(1);
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('banners');
- }
- }
|