2023-05-18 05:55:43 +00:00
|
|
|
INSERT INTO `vn`.`businessType` (`code`, `description`)
|
2023-04-25 12:25:22 +00:00
|
|
|
VALUES ('worker','Trabajador');
|
|
|
|
|
2023-05-18 05:55:43 +00:00
|
|
|
ALTER TABLE `vn`.`workerConfig` ADD businessTypeFk varchar(100) NULL
|
2023-04-25 12:25:22 +00:00
|
|
|
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;
|
|
|
|
|
2023-05-18 05:55:43 +00:00
|
|
|
UPDATE `vn`.`client` c
|
|
|
|
JOIN `vn`.`worker` w ON w.id = c.id
|
2023-05-12 10:51:07 +00:00
|
|
|
SET c.name = REPLACE(c.name, 'TR ', ''),
|
2023-05-18 05:55:43 +00:00
|
|
|
c.businessTypeFk = 'worker';
|