2017_07_11_225347_create_configs_table.php 687 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. class CreateConfigsTable extends Migration {
  5. /**
  6. * Run the migrations.
  7. *
  8. * @return void
  9. */
  10. public function up()
  11. {
  12. Schema::create('configs', function(Blueprint $table)
  13. {
  14. $table->increments('id')->comment('主键');
  15. $table->string('name', 100)->default('')->comment('配置项键名');
  16. $table->text('value', 65535)->nullable()->comment('配置项键值 1表示开启 0 关闭');
  17. $table->timestamps();
  18. $table->softDeletes();
  19. });
  20. }
  21. /**
  22. * Reverse the migrations.
  23. *
  24. * @return void
  25. */
  26. public function down()
  27. {
  28. Schema::dropIfExists('configs');
  29. }
  30. }