2022_10_23_213544_create_member_boths_table.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. /**
  5. * Class CreateMemberBothsTable.
  6. */
  7. class CreateMemberBothsTable extends Migration
  8. {
  9. /**
  10. * Run the migrations.
  11. *
  12. * @return void
  13. */
  14. public function up()
  15. {
  16. Schema::create('member_boths', function(Blueprint $table) {
  17. $table->increments('id');
  18. $table->integer('m_id')->index('m_id')->default('0')->comment('m_id');
  19. $table->integer('tier_num')->default('0')->comment('层级');
  20. $table->integer('left_id')->default('0')->comment('左节点');
  21. $table->integer('right_id')->default('0')->comment('右节点');
  22. $table->integer('parent_id')->default('0')->comment('父级节点');
  23. $table->integer('direct_id')->default('0')->comment('直推节点');
  24. $table->text('parent_ids')->comment('父级族谱');
  25. $table->text('child_ids')->comment('子族谱');
  26. $table->timestamps();
  27. });
  28. }
  29. /**
  30. * Reverse the migrations.
  31. *
  32. * @return void
  33. */
  34. public function down()
  35. {
  36. Schema::drop('member_boths');
  37. }
  38. }