Fix: SQL ambiguous column reference i migration 054

This commit is contained in:
Christian 2026-01-02 15:01:13 +01:00
parent 35308eb172
commit 279c304154

View File

@ -43,7 +43,7 @@ BEGIN
FROM tmodule_customers tc FROM tmodule_customers tc
JOIN customers c ON LOWER(TRIM(tc.name)) = LOWER(TRIM(c.name)) JOIN customers c ON LOWER(TRIM(tc.name)) = LOWER(TRIM(c.name))
WHERE tc.hub_customer_id IS NULL WHERE tc.hub_customer_id IS NULL
AND tc.id NOT IN (SELECT tmodule_id FROM economic_matches) AND tc.id NOT IN (SELECT em.tmodule_id FROM economic_matches em)
), ),
all_matches AS ( all_matches AS (
SELECT * FROM economic_matches SELECT * FROM economic_matches