2019_08_05_210918_create_statistics_table.php 909 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateStatisticsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('statistics', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('name', 50)->comment('名称');
  17. $table->string('slug', 20)->nullable()->comment('标识');
  18. $table->text('body')->nullable()->comment('内容');
  19. $table->date('date')->comment('内容');
  20. $table->tinyInteger('status')->default(1);
  21. $table->timestamps();
  22. });
  23. }
  24. /**
  25. * Reverse the migrations.
  26. *
  27. * @return void
  28. */
  29. public function down()
  30. {
  31. Schema::dropIfExists('statistics');
  32. }
  33. }