You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
db-schema/db_scripts/base/5000_fix_billing.up

15 lines
782 B

USE billing;
ALTER TABLE billing_fees_history ADD KEY `zonehid_idx` (`billing_zones_history_id`);
ALTER TABLE billing_fees_history ADD CONSTRAINT `b_f_h_bzhid_ref` FOREIGN KEY (`billing_zones_history_id`)
REFERENCES `billing_zones_history` (`id`)
ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE voip_subscribers DROP FOREIGN KEY `v_s_pnumid_ref`;
ALTER TABLE voip_subscribers ADD CONSTRAINT `v_s_pnumid_ref` FOREIGN KEY (`primary_number_id`) REFERENCES `voip_numbers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
ALTER TABLE billing_fees AUTO_INCREMENT=1000;
ALTER TABLE billing_fees_history AUTO_INCREMENT=1000;
ALTER TABLE billing_zones AUTO_INCREMENT=1000;
ALTER TABLE billing_zones_history AUTO_INCREMENT=1000;