mirror of https://github.com/sipwise/db-schema.git
Change-Id: Ib13621aeb301212d4c88fadaf4bc1fd69ede7536mr11.4
parent
be1b44ea45
commit
d7ad9934ae
@ -0,0 +1,2 @@
|
||||
USE kamailio;
|
||||
DELETE FROM usr_preferences where attribute = 'reseller_id';
|
@ -0,0 +1,11 @@
|
||||
|
||||
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;
|
Loading…
Reference in new issue