Feat(SQL): Locations redesigned for parent location id stored on location table and links table removed.

This commit is contained in:
2025-07-15 15:21:04 +01:00
parent a3fd8b12fe
commit e0805ec2ed
10 changed files with 13 additions and 124 deletions

View File

@@ -30,6 +30,10 @@ BEGIN
, value_new
, id_change_set
)
-- Changed id_location_parent
SELECT NEW.id_location, 'id_location_parent', CONVERT(OLD.id_location_parent, CHAR), CONVERT(NEW.id_location_parent, CHAR), NEW.id_change_set
WHERE NOT (OLD.id_location_parent <=> NEW.code)
UNION
-- Changed code
SELECT NEW.id_location, 'code', OLD.code, NEW.code, NEW.id_change_set
WHERE NOT (OLD.code <=> NEW.code)