Spalten technical_contact, business_contact

This commit is contained in:
Peter Hormanns 2014-05-17 20:17:50 +02:00
parent 1871821983
commit c3f5a5b248
2 changed files with 10 additions and 3 deletions

View File

@ -90,8 +90,9 @@ INSERT INTO contact (bp_id, salut, first_name, last_name, firma, email)
-- table: bank_account
--
INSERT INTO bank_account (bp_id, autodebit_ga, autodebit_ar, autodebit_op,
bank_customer, bank_account, bank_code, bank_name)
SELECT bp_id, false, false, false, '', '', '', '' FROM business_partner WHERE member_id=10000;
bank_customer, bank_account, bank_code, bank_name, mandat_ref, mandat_signed, mandat_since)
SELECT bp_id, false, false, false, '', '', '', '', member_id, current_date, current_date
FROM business_partner WHERE member_id=10000;
--
-- Table: inet_addr

View File

@ -14,7 +14,11 @@ CREATE TABLE bank_account (
bank_name character varying(50),
bank_iban character varying(30),
bank_bic character varying(15),
mandat_ref character varying(10)
mandat_ref character varying(10) NOT NULL,
mandat_signed date,
mandat_since date,
mandat_until date,
mandat_used date
);
@ -169,6 +173,8 @@ CREATE TABLE contact (
phone_mobile character varying(30),
fax character varying(30),
email character varying(100) NOT NULL,
business_contact boolean DEFAULT TRUE,
technical_contact boolean DEFAULT TRUE,
CONSTRAINT ckc_email_contact CHECK (((email)::text ~~ '%@%.%'::text))
);