| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateLoveAdsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('love_ads', function (Blueprint $table) {
- $table->increments('id');
- $table->Integer('cid')->index()->comment('分类ID');
- $table->string('name',100)->comment('名称');
- $table->string('link',200)->nullable()->comment('链接');
- $table->string('file',200)->nullable()->comment('文件');
- $table->Integer('start')->comment('开始');
- $table->Integer('end')->comment('结束时间');
- $table->tinyInteger('enabled')->default(1)->comment('是否开启');
- $table->timestamps();
- $table->comment = '广告表';
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('love_ads');
- }
- }
|