2020_04_04_141231_create_information_table.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateInformationTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('information', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->string('site_title', 255)->default('')->comment('title');
  17. $table->string('site_keywords')->default('')->comment('keywords');
  18. $table->string('site_description', 255)->default('')->comment('description');
  19. $table->string('author_name', 255)->default('')->comment('author_name');
  20. $table->string('author_intro', 255)->default('')->comment('author_intro');
  21. $table->string('author_avatar', 255)->default('')->comment('author_avatar');
  22. $table->longText('navigation')->nullable()->comment('navigation links');
  23. // $table->integer('user_id')->default(0)->comment('author id');
  24. // $table->integer('cate_id')->default(0)->comment('category id');
  25. // $table->integer('comment_count')->default(0)->comment('comment count');
  26. // $table->integer('read_count')->default(0)->comment('read count');
  27. // $table->tinyInteger('status')->default(1)->comment('status: 1-public;0-private');
  28. // $table->integer('sort')->default(0)->comment('sort');
  29. // $table->tinyInteger('is_top')->default(0)->comment('sticky to top');
  30. $table->integer('updated_at');
  31. $table->integer('created_at');
  32. $table->integer('deleted_at')->nullable();
  33. // $table->index('site_title');
  34. // $table->index('created_at');
  35. });
  36. }
  37. /**
  38. * Reverse the migrations.
  39. *
  40. * @return void
  41. */
  42. public function down()
  43. {
  44. Schema::dropIfExists('information');
  45. }
  46. }