2019_07_29_163710_create_policy_table.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreatePolicyTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('policy', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->smallInteger('type_id')->length(5);
  17. $table->smallInteger('parentid')->length(5);
  18. $table->string('title')->length(100);
  19. $table->mediumText('content');
  20. $table->string('tit_color')->length(10)->nullable();
  21. $table->tinyInteger('tit_b')->length(1);
  22. $table->string('small_img')->length(255)->nullable();
  23. $table->string('author')->length(50)->nullable();
  24. $table->string('source')->length(100)->nullable();
  25. $table->tinyInteger('focos')->length(3);
  26. $table->tinyInteger('is_display')->length(3);
  27. $table->string('is_url')->length(200);
  28. $table->string('seo_keywords')->length(100)->nullable();
  29. $table->string('seo_description')->length(200)->nullable();
  30. $table->integer('click')->length(10);
  31. $table->integer('addtime')->length(10);
  32. $table->smallInteger('article_order')->length(5);
  33. $table->string('level_id')->length(100)->nullable();
  34. $table->string('level_name')->length(255)->nullable();
  35. $table->timestamps();
  36. });
  37. }
  38. /**
  39. * Reverse the migrations.
  40. *
  41. * @return void
  42. */
  43. public function down()
  44. {
  45. Schema::dropIfExists('policy');
  46. }
  47. }