Skip to content

Commit 49b9a6d

Browse files
committed
Fix upgrade to v22
1 parent 386a140 commit 49b9a6d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

htdocs/install/mysql/migration/21.0.0-22.0.0.sql

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,35 @@ CREATE TABLE llx_bank_record_link
160160
fk_bank_import integer NOT NULL
161161
)ENGINE=innodb;
162162

163+
CREATE TABLE llx_bank_import
164+
(
165+
rowid integer AUTO_INCREMENT PRIMARY KEY,
166+
id_account integer NOT NULL, -- bank account ID in Dolibarr
167+
record_type varchar(64) NULL, -- OFX Type of transaction: DIRECTDEBIT, XFER, OTHER or code/type of operation
168+
label varchar(255) NOT NULL, -- label of operation
169+
record_type_origin varchar(255) NOT NULL, -- operation code/type origin
170+
label_origin varchar(255) NOT NULL, -- label of operation origin
171+
comment text NULL, -- Comment/Motif
172+
note text NULL, -- Notes like "References"
173+
bdate date NULL, -- date operation
174+
vdate date NULL, -- date value
175+
date_scraped datetime NULL, -- date discarded
176+
original_amount double(24,8) NULL, -- OFX amount
177+
original_currency varchar(255) NULL, -- OFX Currency
178+
amount_debit double(24,8) NOT NULL, -- money spent. For statement using debit/credit. For statement using 1 amount, use original_amount.
179+
amount_credit double(24,8) NOT NULL, -- money received. For statement using debit/credit. For statement using 1 amount, use original_amount.
180+
deleted_date datetime NULL, -- to flag this record as deleted
181+
fk_duplicate_of integer NULL, -- to flag this record as a duplicate of another one
182+
status smallint NOT NULL, -- 0=just imported
183+
datec datetime NOT NULL, -- date creation
184+
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- date of last modification
185+
fk_user_author integer NOT NULL, -- user who created the record
186+
fk_user_modif integer, -- user who modified the record
187+
import_key varchar(14), -- import key
188+
datas text NOT NULL -- full record/line coming from source
189+
)ENGINE=innodb;
190+
191+
163192
ALTER TABLE llx_bank_record_link ADD CONSTRAINT fk_bank_record_bank_record FOREIGN KEY (fk_bank_record) REFERENCES llx_bank_record (rowid);
164193
ALTER TABLE llx_bank_record_link ADD CONSTRAINT fk_bank_import_bank_import FOREIGN KEY (fk_bank_import) REFERENCES llx_bank_import (rowid);
165194

0 commit comments

Comments
 (0)