From 5fddfe2e8abc6cbede90eb2fd12fce9dbb416a21 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 15 Feb 2024 11:44:32 +0100 Subject: [PATCH] =?UTF-8?q?Compatibilit=C3=A9=20Dolibarr=20v18:=20valeur?= =?UTF-8?q?=20par=20d=C3=A9faut=20et=20"on=20update"=20pour=20le=20champs?= =?UTF-8?q?=20llx=5Fpickup=5Fpickupline.tms.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog.md | 4 ++++ sql/llx_pickup_pickupline.sql | 2 +- sql/update_2.5.1.sql | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 sql/update_2.5.1.sql diff --git a/ChangeLog.md b/ChangeLog.md index 94151c28..664a9980 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,9 @@ # DolibarrPickup +## 2.5.1 + +* Compatibilité Dolibarr v18: valeur par défaut et "on update" pour le champs llx_pickup_pickupline.tms. + ## 2.5.0 **Important** : Cette mise à jour contient de nouveaux paramètres. Pour les initialiser, il faut désactiver puis réactiver le module. Si vous ne le faites pas, l'application pourrait être buguée (utilisation de mauvaises unités de mesure, avec des résultats imprédictibles). diff --git a/sql/llx_pickup_pickupline.sql b/sql/llx_pickup_pickupline.sql index 79d6d691..7d7c044f 100644 --- a/sql/llx_pickup_pickupline.sql +++ b/sql/llx_pickup_pickupline.sql @@ -32,7 +32,7 @@ CREATE TABLE llx_pickup_pickupline( deee_type varchar(255) DEFAULT NULL, qty integer DEFAULT 1 NOT NULL, -- DEPRECATED 2023-03-13: batch varchar(128) DEFAULT NULL, - tms timestamp NOT NULL, + tms timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, position integer NOT NULL, diff --git a/sql/update_2.5.1.sql b/sql/update_2.5.1.sql new file mode 100644 index 00000000..96dc16d9 --- /dev/null +++ b/sql/update_2.5.1.sql @@ -0,0 +1,16 @@ +-- Copyright (C) 2023 John Livingston +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU Affero General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Affero General Public License for more details. +-- +-- You should have received a copy of the GNU Affero General Public License +-- along with this program. If not, see https://www.gnu.org/licenses/. + +ALTER TABLE llx_pickup_pickupline MODIFY tms timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP