diff --git a/postgres/init.sql b/postgres/init.sql index d43e51f..07058cf 100644 --- a/postgres/init.sql +++ b/postgres/init.sql @@ -400,7 +400,7 @@ CREATE TABLE IF NOT EXISTS cdefou_ligne ( no_id BIGINT PRIMARY KEY, artfou1_no_id BIGINT, commande_fou_no_id BIGINT, - cdelig INTEGER, + cdelig TEXT, cdeligtard TIMESTAMP, cdeligtot TIMESTAMP, prixbrut NUMERIC(12,4), diff --git a/sync/tables/appro.js b/sync/tables/appro.js index f5f13b5..81b2daa 100644 --- a/sync/tables/appro.js +++ b/sync/tables/appro.js @@ -81,7 +81,7 @@ async function syncAppro(force) { no_id: r.NO_ID, artfou1_no_id: r.ARTFOU1_NO_ID, commande_fou_no_id: r.COMMANDE_FOU_NO_ID, - cdelig: r.CDELIG ?? null, + cdelig: safeStr(r.CDELIG), cdeligtard: r.CDELIGTARD ?? null, cdeligtot: r.CDELIGTOT ?? null, prixbrut: r.PRIXBRUT ?? null,