Volltext-Suche: Tabelle für Texte aus Dateien im DMS. DB und Rose
[kivitendo-erp.git] / sql / Pg-upgrade2 / automatic_reconciliation.sql
1 -- @tag: automatic_reconciliation
2 -- @description: Erstellt Tabelle reconiliation_links für den automatischen Kontenabgleich.
3 -- @depends: release_3_2_0 bank_transactions
4
5 CREATE TABLE reconciliation_links (
6   id                      integer NOT NULL DEFAULT nextval('id'),
7   bank_transaction_id     integer NOT NULL,
8   acc_trans_id            bigint  NOT NULL,
9   rec_group               integer NOT NULL,
10
11   PRIMARY KEY (id),
12   FOREIGN KEY (bank_transaction_id)      REFERENCES bank_transactions (id),
13   FOREIGN KEY (acc_trans_id)             REFERENCES acc_trans (acc_trans_id)
14 );