salix/db/versions/10976-greenCamellia/00-firstScript.sql

20 lines
547 B
MySQL
Raw Normal View History

CREATE OR REPLACE TEMPORARY TABLE tmp.claimsWithHasToPickUp
SELECT id
FROM vn.claim
WHERE hasToPickUp;
ALTER TABLE vn.claim CHANGE hasToPickUp pickup ENUM('agency', 'delivery') DEFAULT NULL;
UPDATE vn.claim c
JOIN tmp.claimsWithHasToPickUp tmp ON tmp.id = c.id
SET c.pickup = 'delivery';
2024-04-09 08:10:11 +00:00
-- Solved bug empty value
UPDATE vn.claim
SET pickup = NULL
WHERE pickup = '';
DROP TEMPORARY TABLE tmp.claimsWithHasToPickUp;
INSERT INTO salix.ACL (model,property,accessType,principalId)
VALUES ('Application','getEnumValues','*','employee');