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/15770.up

11 lines
406 B

SET AUTOCOMMIT=0;
USE kamailio;
INSERT INTO usr_preferences (uuid,username,domain,attribute,type,value,last_modified)
SELECT uuid,username,domain,'reseller_id',type,(
SELECT reseller_id FROM billing.contracts LEFT JOIN billing.contacts on billing.contacts.id=billing.contracts.contact_id
WHERE billing.contracts.id=value
),now() FROM usr_preferences WHERE attribute='account_id';
COMMIT;