2019_07_08_124004_create_love_ads_table.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateLoveAdsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('love_ads', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->Integer('cid')->index()->comment('分类ID');
  17. $table->string('name',100)->comment('名称');
  18. $table->string('link',200)->nullable()->comment('链接');
  19. $table->string('file',200)->nullable()->comment('文件');
  20. $table->Integer('start')->comment('开始');
  21. $table->Integer('end')->comment('结束时间');
  22. $table->tinyInteger('enabled')->default(1)->comment('是否开启');
  23. $table->timestamps();
  24. $table->comment = '广告表';
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. Schema::dropIfExists('love_ads');
  35. }
  36. }