salix/db/changes/232001/00-createWorker.sql

14 lines
438 B
MySQL
Raw Normal View History

2023-04-25 12:25:22 +00:00
INSERT INTO vn.businessType (code,description)
VALUES ('worker','Trabajador');
ALTER TABLE `vn`.`workerConfig` ADD businessTypeFk varchar(100) NULL
COMMENT 'Tipo de negocio por defecto al dar de alta un trabajador nuevo';
UPDATE `vn`.`workerConfig`
SET businessTypeFk = 'worker'
2023-05-12 10:51:07 +00:00
WHERE id = 1;
UPDATE client c
JOIN worker w ON w.id = c.id
SET c.name = REPLACE(c.name, 'TR ', ''),
c.businessTypeFk = 'worker';