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

11 lines
331 B

USE billing;
SET AUTOCOMMIT=0;
INSERT INTO contacts VALUES(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, now(), now(), NULL);
SELECT LAST_INSERT_ID() INTO @contact_id;
UPDATE contracts c, resellers r SET c.contact_id = @contact_id WHERE c.id = r.contract_id and c.contact_id IS NULL;
COMMIT;