unsignedInteger('partner_id')->nullable()->after('system_id') ->comment('Partner-specific config (NULL = system default)'); $table->string('partner_type', 50)->nullable()->after('partner_id') ->comment('Partner type: da|credit-fair|co-lending'); // Add index for better query performance $table->index(['system_id', 'partner_id', 'partner_type'], 'idx_system_partner'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table('odoo_jv_sections', function (Blueprint $table) { $table->dropIndex('idx_system_partner'); $table->dropColumn(['partner_id', 'partner_type']); }); } }