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 <noreply@anthropic.com>
This commit is contained in:
Eduard Wisch 2026-02-20 09:15:32 +01:00
parent 6342225cc1
commit 2f0f438ec4
2 changed files with 10 additions and 1 deletions

View file

@ -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' $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' // 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 // Url to the file with your last numberversion of this module
//$this->url_last_version = 'http://www.example.com/versionmodule.txt'; //$this->url_last_version = 'http://www.example.com/versionmodule.txt';

9
sql/update_1.7.sql Normal file
View file

@ -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);