USE billing;
ALTER TABLE `invoice_template`
ADD UNIQUE INDEX `invoice_template_reseller_active_UNIQUE` (`reseller_id`,`is_active`);