repair test data for schema updates

This commit is contained in:
Peter Hormanns 2013-04-23 16:48:16 +02:00
parent f32fd2c6b7
commit 27be93d31c
2 changed files with 10 additions and 7 deletions

View File

@ -1,10 +1,12 @@
-- --
-- Table: basepacket -- Table: basepacket
-- --
INSERT INTO basepacket (basepacket_code, description, sorting, valid) INSERT INTO basepacket (basepacket_code, description, sorting, valid, article_number)
VALUES ('DW/B', 'Dynamic-Web/Base', 100, true); VALUES ('DW/B', 'Dynamic-Web/Base', 200, true, 100);
INSERT INTO basepacket (basepacket_code, description, sorting, valid) INSERT INTO basepacket (basepacket_code, description, sorting, valid, article_number)
VALUES ('SW/B', 'Static-Web/Base', 200, true); VALUES ('SW/B', 'Static-Web/Base', 300, true, 200);
INSERT INTO basepacket (basepacket_code, description, sorting, valid, article_number)
VALUES ('WEB', 'Web/Base', 100, true, 300);
-- --
-- Table: basecomponent -- Table: basecomponent
@ -59,8 +61,8 @@ INSERT INTO contact (bp_id, salut, first_name, last_name, firma, email)
-- --
-- table: bank_account -- table: bank_account
-- --
INSERT INTO bank_account (bp_id) INSERT INTO bank_account (bp_id, autodebit_ga, autodebit_ar, autodebit_op)
SELECT bp_id FROM business_partner WHERE member_id=10000; SELECT bp_id, false, false, true FROM business_partner WHERE member_id=10000;
-- --
-- table: billdata -- table: billdata

View File

@ -123,7 +123,8 @@ CREATE TABLE business_partner (
uid_vat character varying(20), uid_vat character varying(20),
CONSTRAINT ckc_member_id_business CHECK (((member_id >= 10000) AND (member_id <= 99999))), CONSTRAINT ckc_member_id_business CHECK (((member_id >= 10000) AND (member_id <= 99999))),
CONSTRAINT ckc_shares_signed_business CHECK ((shares_signed >= 0)), CONSTRAINT ckc_shares_signed_business CHECK ((shares_signed >= 0)),
CONSTRAINT ckt_business_partner CHECK ( ( ((member_since IS NULL) AND (member_until IS NULL)) OR ((member_since IS NOT NULL) AND (member_until IS NULL)) OR ((member_since IS NOT NULL) AND (member_until IS NOT NULL) AND (member_since < member_until)) ) AND ((member_code)::text ~~ 'hsh00-%'::text)) CONSTRAINT ckt_business_partner CHECK ( ( ((member_since IS NULL) AND (member_until IS NULL)) OR ((member_since IS NOT NULL) AND (member_until IS NULL)) OR ((member_since IS NOT NULL) AND (member_until IS NOT NULL) AND (member_since < member_until)) ) AND ((member_code)::text ~~ 'hsh00-%'::text)),
UNIQUE (bp_id)
); );