From aff07ac13cc635164999bf9b134b3ea11fdb0d62 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Mon, 12 Apr 2021 14:43:28 +0200 Subject: [PATCH] FIX : UPDATE query must not use alias for postgres compatibility --- htdocs/install/mysql/migration/13.0.0-14.0.0.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql index f2ae6c7d173..9760505ac71 100644 --- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -269,8 +269,8 @@ ALTER TABLE llx_payment_salary CHANGE COLUMN fk_user fk_user integer NULL; ALTER TABLE llx_payment_salary ADD COLUMN fk_salary integer; INSERT INTO llx_salary (rowid, ref, fk_user, amount, fk_projet, fk_typepayment, label, datesp, dateep, entity, note, fk_bank, paye) SELECT ps.rowid, ps.rowid, ps.fk_user, ps.amount, ps.fk_projet, ps.fk_typepayment, ps.label, ps.datesp, ps.dateep, ps.entity, ps.note, ps.fk_bank, 1 FROM llx_payment_salary ps WHERE ps.fk_salary IS NULL; -UPDATE llx_payment_salary as ps SET ps.fk_salary = ps.rowid WHERE ps.fk_salary IS NULL; -UPDATE llx_payment_salary as ps SET ps.ref = ps.rowid WHERE ps.ref IS NULL; +UPDATE llx_payment_salary SET fk_salary = rowid WHERE fk_salary IS NULL; +UPDATE llx_payment_salary SET ref = rowid WHERE ref IS NULL; ALTER TABLE llx_salary CHANGE paye paye smallint default 0 NOT NULL;