2013_07_02_165645_create_yz_site_setting.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateYzSiteSetting extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. if (!Schema::hasTable('yz_site_setting')) {
  15. Schema::create('yz_site_setting', function (Blueprint $table) {
  16. $table->increments('id');
  17. $table->mediumText('value')->default('')->comment('设置内容');
  18. $table->integer('created_at')->nullable();
  19. $table->integer('updated_at')->nullable();
  20. });
  21. \Illuminate\Support\Facades\DB::statement("ALTER TABLE `" . app('db')->getTablePrefix()
  22. . "yz_site_setting` comment '系统工具--系统工具设置表'");
  23. }
  24. }
  25. /**
  26. * Reverse the migrations.
  27. *
  28. * @return void
  29. */
  30. public function down()
  31. {
  32. Schema::drop('yz_site_setting');
  33. }
  34. }