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/diff/15027.up

12 lines
394 B

USE billing;
INSERT INTO contacts(email) VALUES('default-system@default.invalid');
SELECT LAST_INSERT_ID() INTO @cid;
UPDATE contracts ctr, billing_mappings m, products p, contacts c SET ctr.contact_id = @cid
WHERE c.id = ctr.contact_id
AND m.contract_id = ctr.id
AND m.product_id = p.id
AND p.class IN ('pstnpeering', 'sippeering', 'reseller')
AND c.reseller_id IS NOT NULL;