2019_06_17_020159_create_star_news_table.php 959 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateStarNewsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('star_news', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('title', 30)->comment('新闻标题');
  17. $table->string('content', 200)->comment('文字说明');
  18. $table->string('cover_img')->comment('封面图');
  19. $table->tinyInteger('status')->default(0)->comment('状态: 0.禁用;1.启用');
  20. $table->integer('sort')->nullable()->comment('排序');
  21. $table->timestamps();
  22. });
  23. }
  24. /**
  25. * Reverse the migrations.
  26. *
  27. * @return void
  28. */
  29. public function down()
  30. {
  31. Schema::dropIfExists('star_news');
  32. }
  33. }