2019_04_17_115424_create_membership_infomattion_log.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateMembershipInfomattionLog extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. if (!Schema::hasTable('yz_membership_infomattion_log')) {
  15. Schema::create('yz_membership_infomattion_log', function (Blueprint $table) {
  16. $table->increments('id');
  17. $table->integer('uniacid');
  18. $table->integer('uid');
  19. $table->string('old_data')->nullable()->comment('用户修改前信息');
  20. $table->string('session_id')->nullable()->comment('session_id');
  21. $table->integer('created_at')->nullable();
  22. $table->integer('updated_at')->nullable();
  23. $table->integer('deleted_at')->nullable();
  24. });
  25. \Illuminate\Support\Facades\DB::statement("ALTER TABLE " . app('db')->getTablePrefix() . "yz_membership_infomattion_log comment '会员信息修改记录表'");//表注释
  26. }
  27. }
  28. /**
  29. * Reverse the migrations.
  30. *
  31. * @return void
  32. */
  33. public function down()
  34. {
  35. Schema::dropIfExists('yz_membership_infomattion_log');
  36. }
  37. }