From 2f0f438ec40d47ae30667e3c992455d1a08e283e Mon Sep 17 00:00:00 2001 From: data Date: Fri, 20 Feb 2026 09:15:32 +0100 Subject: [PATCH] Add update SQL script for v1.7 migrations Adds fk_statement column for existing installations that were created before this column was added to the schema. Co-Authored-By: Claude Opus 4.5 --- core/modules/modBankImport.class.php | 2 +- sql/update_1.7.sql | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 sql/update_1.7.sql diff --git a/core/modules/modBankImport.class.php b/core/modules/modBankImport.class.php index fb1f83b..35cdf68 100755 --- a/core/modules/modBankImport.class.php +++ b/core/modules/modBankImport.class.php @@ -76,7 +76,7 @@ class modBankImport extends DolibarrModules $this->editor_squarred_logo = ''; // Must be image filename into the module/img directory followed with @modulename. Example: 'myimage.png@bankimport' // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z' - $this->version = '1.8'; + $this->version = '1.9'; // Url to the file with your last numberversion of this module //$this->url_last_version = 'http://www.example.com/versionmodule.txt'; diff --git a/sql/update_1.7.sql b/sql/update_1.7.sql new file mode 100644 index 0000000..48d6bff --- /dev/null +++ b/sql/update_1.7.sql @@ -0,0 +1,9 @@ +-- Update script for BankImport module v1.7 +-- Run this if upgrading from earlier versions + +-- Add fk_statement column if not exists +ALTER TABLE llx_bankimport_transaction ADD COLUMN IF NOT EXISTS fk_statement INTEGER DEFAULT NULL; + +-- Add index for fk_statement if not exists +-- Note: MySQL/MariaDB syntax - check before running on other DB +-- CREATE INDEX IF NOT EXISTS idx_bankimport_transaction_statement ON llx_bankimport_transaction (fk_statement);