1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- /**
- * Class CreateMemberBothsTable.
- */
- class CreateMemberBothsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('member_boths', function(Blueprint $table) {
- $table->increments('id');
- $table->integer('m_id')->index('m_id')->default('0')->comment('m_id');
- $table->integer('tier_num')->default('0')->comment('层级');
- $table->integer('left_id')->default('0')->comment('左节点');
- $table->integer('right_id')->default('0')->comment('右节点');
- $table->integer('parent_id')->default('0')->comment('父级节点');
- $table->integer('direct_id')->default('0')->comment('直推节点');
- $table->text('parent_ids')->comment('父级族谱');
- $table->text('child_ids')->comment('子族谱');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::drop('member_boths');
- }
- }
|