bigInteger('id')->primary(); $table->string('res_id',36); $table->integer('res_type'); $table->string('cooperator_id',36); $table->integer('cooperator_type'); $table->integer('power'); $table->bigInteger('create_time'); $table->bigInteger('modify_time'); $table->timestamp('accepted_at')->nullable()->index(); $table->bigInteger('acceptor')->nullable(); $table->timestamp('created_at')->useCurrent()->index(); $table->timestamp('updated_at')->useCurrent()->useCurrentOnUpdate()->index(); $table->unique(['res_id','res_type','cooperator_id','cooperator_type']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('shares'); } }