2018_09_29_095206_create_pages_table.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreatePagesTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('pages', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->tinyInteger('systemclass')->default('0')->comment('系统内置类型编号(1:系统 0 : 自定义)');
  17. $table->tinyInteger('pagetpye')->default('1')->comment('页面类型(1:首页或频道首页 2:信息列表页 3:信息内容页)');
  18. $table->string('alias')->comment('别名');
  19. $table->string('pname')->comment('页面名称');
  20. $table->string('route')->comment('路由指向');
  21. $table->string('rewrite')->default(null)->comment('伪静态规则');
  22. $table->tinyInteger('url')->default('1')->comment('优化链接(1:伪静态)');
  23. $table->integer('caching')->default('0')->comment('缓存时间(分钟)');
  24. $table->string('tag')->comment('导航关联标记(缓存)');
  25. $table->string('title')->comment('Seo标题');
  26. $table->string('description')->comment('Seo描述');
  27. $table->string('keywords')->comment('Seo关键字');
  28. $table->tinyInteger('subsite_id')->default('0')->comment('分站信息(0:总站)');
  29. $table->timestamps();
  30. $table->softDeletes();
  31. });
  32. }
  33. /**
  34. * Reverse the migrations.
  35. *
  36. * @return void
  37. */
  38. public function down()
  39. {
  40. Schema::dropIfExists('pages');
  41. }
  42. }