2 -- @description: Tabellen für den SEPA-XML-Exportassistenten
3 -- @depends: release_2_6_0
5 --DROP TABLE sepa_export_items;
6 --DROP TABLE sepa_export;
7 --DROP SEQUENCE sepa_export_id_seq;
9 CREATE SEQUENCE sepa_export_id_seq;
11 CREATE TABLE sepa_export (
12 id integer NOT NULL DEFAULT nextval('sepa_export_id_seq'),
13 employee_id integer NOT NULL,
14 executed boolean DEFAULT FALSE,
15 closed boolean DEFAULT FALSE,
16 itime timestamp DEFAULT now(),
19 FOREIGN KEY (employee_id) REFERENCES employee (id)
22 CREATE TABLE sepa_export_items (
23 id integer NOT NULL DEFAULT nextval('id'),
24 sepa_export_id integer NOT NULL,
25 ap_id integer NOT NULL,
26 chart_id integer NOT NULL,
28 reference varchar(35),
29 requested_execution_date date,
30 executed boolean DEFAULT FALSE,
33 our_iban varchar(100),
35 vendor_iban varchar(100),
36 vendor_bic varchar(100),
38 end_to_end_id varchar(35),
41 FOREIGN KEY (sepa_export_id) REFERENCES sepa_export (id),
42 FOREIGN KEY (ap_id) REFERENCES ap (id),
43 FOREIGN KEY (chart_id) REFERENCES chart (id)