where('action', '!=', 'view') ->delete(); Schema::table('joint_permissions', function (Blueprint $table) { $table->dropPrimary(['role_id', 'entity_type', 'entity_id', 'action']); $table->dropColumn('action'); $table->primary(['role_id', 'entity_type', 'entity_id'], 'joint_primary'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('joint_permissions', function (Blueprint $table) { $table->string('action'); $table->dropPrimary(['role_id', 'entity_type', 'entity_id']); $table->primary(['role_id', 'entity_type', 'entity_id', 'action']); }); } };