increments('id'); $table->integer('activity_id'); $table->integer('group_id')->nullable(); $table->integer('member_id'); $table->integer('nami_id')->nullable(); $table->timestamps(); $table->unique(['activity_id', 'group_id', 'member_id', 'nami_id']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('memberships'); } }