introduce-separate-database-schemas-hs-booking-and-hosting #106
@ -7,7 +7,7 @@
|
|||||||
/*
|
/*
|
||||||
Generates a customer reference number for a given test data counter.
|
Generates a customer reference number for a given test data counter.
|
||||||
*/
|
*/
|
||||||
create or replace function rbactest.testCustomerReference(customerCount integer)
|
create or replace function rbactest.customer_create_test_data(customerCount integer)
|
||||||
returns integer
|
returns integer
|
||||||
returns null on null input
|
returns null on null input
|
||||||
language plpgsql as $$
|
language plpgsql as $$
|
||||||
@ -19,7 +19,7 @@ end; $$;
|
|||||||
/*
|
/*
|
||||||
Creates a single customer test record with dist.
|
Creates a single customer test record with dist.
|
||||||
*/
|
*/
|
||||||
create or replace procedure rbactest.createTestCustomerTestData(
|
create or replace procedure rbactest.customer_create_test_data(
|
||||||
custReference integer,
|
custReference integer,
|
||||||
custPrefix varchar
|
custPrefix varchar
|
||||||
)
|
)
|
||||||
@ -51,7 +51,7 @@ end; $$;
|
|||||||
/*
|
/*
|
||||||
Creates a range of test customers for mass data generation.
|
Creates a range of test customers for mass data generation.
|
||||||
*/
|
*/
|
||||||
create or replace procedure rbactest.createTestCustomerTestData(
|
create or replace procedure rbactest.customer_create_test_data(
|
||||||
startCount integer, -- count of auto generated rows before the run
|
startCount integer, -- count of auto generated rows before the run
|
||||||
endCount integer -- count of auto generated rows after the run
|
endCount integer -- count of auto generated rows after the run
|
||||||
)
|
)
|
||||||
@ -59,7 +59,7 @@ create or replace procedure rbactest.createTestCustomerTestData(
|
|||||||
begin
|
begin
|
||||||
for t in startCount..endCount
|
for t in startCount..endCount
|
||||||
loop
|
loop
|
||||||
call rbactest.createTestCustomerTestData(rbactest.testCustomerReference(t), base.intToVarChar(t, 3));
|
call rbactest.customer_create_test_data(rbactest.testCustomerReference(t), base.intToVarChar(t, 3));
|
||||||
commit;
|
commit;
|
||||||
end loop;
|
end loop;
|
||||||
end; $$;
|
end; $$;
|
||||||
@ -74,9 +74,9 @@ do language plpgsql $$
|
|||||||
begin
|
begin
|
||||||
call base.defineContext('creating RBAC test customer', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
call base.defineContext('creating RBAC test customer', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
||||||
|
|
||||||
call rbactest.createTestCustomerTestData(99901, 'xxx');
|
call rbactest.customer_create_test_data(99901, 'xxx');
|
||||||
call rbactest.createTestCustomerTestData(99902, 'yyy');
|
call rbactest.customer_create_test_data(99902, 'yyy');
|
||||||
call rbactest.createTestCustomerTestData(99903, 'zzz');
|
call rbactest.customer_create_test_data(99903, 'zzz');
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
--//
|
--//
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/*
|
/*
|
||||||
Creates the given number of test packages for the given customer.
|
Creates the given number of test packages for the given customer.
|
||||||
*/
|
*/
|
||||||
create or replace procedure rbactest.createPackageTestData(customerPrefix varchar, pacCount int)
|
create or replace procedure rbactest.package_create_test_data(customerPrefix varchar, pacCount int)
|
||||||
language plpgsql as $$
|
language plpgsql as $$
|
||||||
declare
|
declare
|
||||||
cust rbactest.customer;
|
cust rbactest.customer;
|
||||||
@ -41,7 +41,7 @@ end; $$;
|
|||||||
/*
|
/*
|
||||||
Creates a range of test packages for mass data generation.
|
Creates a range of test packages for mass data generation.
|
||||||
*/
|
*/
|
||||||
create or replace procedure rbactest.createPackageTestData()
|
create or replace procedure rbactest.package_create_test_data()
|
||||||
language plpgsql as $$
|
language plpgsql as $$
|
||||||
declare
|
declare
|
||||||
cust rbactest.customer;
|
cust rbactest.customer;
|
||||||
@ -49,7 +49,7 @@ begin
|
|||||||
for cust in (select * from rbactest.customer)
|
for cust in (select * from rbactest.customer)
|
||||||
loop
|
loop
|
||||||
continue when cust.reference >= 90000; -- reserved for functional testing
|
continue when cust.reference >= 90000; -- reserved for functional testing
|
||||||
call rbactest.createPackageTestData(cust.prefix, 3);
|
call rbactest.package_create_test_data(cust.prefix, 3);
|
||||||
end loop;
|
end loop;
|
||||||
|
|
||||||
commit;
|
commit;
|
||||||
@ -64,9 +64,9 @@ $$;
|
|||||||
|
|
||||||
do language plpgsql $$
|
do language plpgsql $$
|
||||||
begin
|
begin
|
||||||
call rbactest.createPackageTestData('xxx', 3);
|
call rbactest.package_create_test_data('xxx', 3);
|
||||||
call rbactest.createPackageTestData('yyy', 3);
|
call rbactest.package_create_test_data('yyy', 3);
|
||||||
call rbactest.createPackageTestData('zzz', 3);
|
call rbactest.package_create_test_data('zzz', 3);
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
--//
|
--//
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/*
|
/*
|
||||||
Creates the given count of test unix users for a single package.
|
Creates the given count of test unix users for a single package.
|
||||||
*/
|
*/
|
||||||
create or replace procedure rbactest.createDomainTestData( packageName varchar, domainCount int )
|
create or replace procedure rbactest.domain_create_test_data( packageName varchar, domainCount int )
|
||||||
language plpgsql as $$
|
language plpgsql as $$
|
||||||
declare
|
declare
|
||||||
pac record;
|
pac record;
|
||||||
@ -32,7 +32,7 @@ end; $$;
|
|||||||
/*
|
/*
|
||||||
Creates a range of unix users for mass data generation.
|
Creates a range of unix users for mass data generation.
|
||||||
*/
|
*/
|
||||||
create or replace procedure rbactest.createDomainTestData( domainPerPackage integer )
|
create or replace procedure rbactest.domain_create_test_data( domainPerPackage integer )
|
||||||
language plpgsql as $$
|
language plpgsql as $$
|
||||||
declare
|
declare
|
||||||
pac record;
|
pac record;
|
||||||
@ -43,7 +43,7 @@ begin
|
|||||||
join rbactest.customer c on p.customeruuid = c.uuid
|
join rbactest.customer c on p.customeruuid = c.uuid
|
||||||
where c.reference < 90000) -- reserved for functional testing
|
where c.reference < 90000) -- reserved for functional testing
|
||||||
loop
|
loop
|
||||||
call rbactest.createdomainTestData(pac.name, 2);
|
call rbactest.domain_create_test_data(pac.name, 2);
|
||||||
commit;
|
commit;
|
||||||
end loop;
|
end loop;
|
||||||
|
|
||||||
@ -57,17 +57,17 @@ end; $$;
|
|||||||
|
|
||||||
do language plpgsql $$
|
do language plpgsql $$
|
||||||
begin
|
begin
|
||||||
call rbactest.createDomainTestData('xxx00', 2);
|
call rbactest.domain_create_test_data('xxx00', 2);
|
||||||
call rbactest.createDomainTestData('xxx01', 2);
|
call rbactest.domain_create_test_data('xxx01', 2);
|
||||||
call rbactest.createDomainTestData('xxx02', 2);
|
call rbactest.domain_create_test_data('xxx02', 2);
|
||||||
|
|
||||||
call rbactest.createDomainTestData('yyy00', 2);
|
call rbactest.domain_create_test_data('yyy00', 2);
|
||||||
call rbactest.createDomainTestData('yyy01', 2);
|
call rbactest.domain_create_test_data('yyy01', 2);
|
||||||
call rbactest.createDomainTestData('yyy02', 2);
|
call rbactest.domain_create_test_data('yyy02', 2);
|
||||||
|
|
||||||
call rbactest.createDomainTestData('zzz00', 2);
|
call rbactest.domain_create_test_data('zzz00', 2);
|
||||||
call rbactest.createDomainTestData('zzz01', 2);
|
call rbactest.domain_create_test_data('zzz01', 2);
|
||||||
call rbactest.createDomainTestData('zzz02', 2);
|
call rbactest.domain_create_test_data('zzz02', 2);
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
--//
|
--//
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
Creates a single contact test record.
|
Creates a single contact test record.
|
||||||
*/
|
*/
|
||||||
create or replace procedure hs_office.createHsOfficeContactTestData(contCaption varchar)
|
create or replace procedure hs_office.contact_create_test_data(contCaption varchar)
|
||||||
language plpgsql as $$
|
language plpgsql as $$
|
||||||
declare
|
declare
|
||||||
postalAddr varchar;
|
postalAddr varchar;
|
||||||
@ -36,7 +36,7 @@ end; $$;
|
|||||||
/*
|
/*
|
||||||
Creates a range of test contact for mass data generation.
|
Creates a range of test contact for mass data generation.
|
||||||
*/
|
*/
|
||||||
create or replace procedure hs_office.createHsOfficeContactTestData(
|
create or replace procedure hs_office.contact_create_test_data(
|
||||||
startCount integer, -- count of auto generated rows before the run
|
startCount integer, -- count of auto generated rows before the run
|
||||||
endCount integer -- count of auto generated rows after the run
|
endCount integer -- count of auto generated rows after the run
|
||||||
)
|
)
|
||||||
@ -44,7 +44,7 @@ create or replace procedure hs_office.createHsOfficeContactTestData(
|
|||||||
begin
|
begin
|
||||||
for t in startCount..endCount
|
for t in startCount..endCount
|
||||||
loop
|
loop
|
||||||
call hs_office.createHsOfficeContactTestData(base.intToVarChar(t, 4) || '#' || t);
|
call hs_office.contact_create_test_data(base.intToVarChar(t, 4) || '#' || t);
|
||||||
commit;
|
commit;
|
||||||
end loop;
|
end loop;
|
||||||
end; $$;
|
end; $$;
|
||||||
@ -58,18 +58,18 @@ end; $$;
|
|||||||
do language plpgsql $$
|
do language plpgsql $$
|
||||||
begin
|
begin
|
||||||
-- TODO: use better names
|
-- TODO: use better names
|
||||||
call hs_office.createHsOfficeContactTestData('first contact');
|
call hs_office.contact_create_test_data('first contact');
|
||||||
call hs_office.createHsOfficeContactTestData('second contact');
|
call hs_office.contact_create_test_data('second contact');
|
||||||
call hs_office.createHsOfficeContactTestData('third contact');
|
call hs_office.contact_create_test_data('third contact');
|
||||||
call hs_office.createHsOfficeContactTestData('fourth contact');
|
call hs_office.contact_create_test_data('fourth contact');
|
||||||
call hs_office.createHsOfficeContactTestData('fifth contact');
|
call hs_office.contact_create_test_data('fifth contact');
|
||||||
call hs_office.createHsOfficeContactTestData('sixth contact');
|
call hs_office.contact_create_test_data('sixth contact');
|
||||||
call hs_office.createHsOfficeContactTestData('seventh contact');
|
call hs_office.contact_create_test_data('seventh contact');
|
||||||
call hs_office.createHsOfficeContactTestData('eighth contact');
|
call hs_office.contact_create_test_data('eighth contact');
|
||||||
call hs_office.createHsOfficeContactTestData('ninth contact');
|
call hs_office.contact_create_test_data('ninth contact');
|
||||||
call hs_office.createHsOfficeContactTestData('tenth contact');
|
call hs_office.contact_create_test_data('tenth contact');
|
||||||
call hs_office.createHsOfficeContactTestData('eleventh contact');
|
call hs_office.contact_create_test_data('eleventh contact');
|
||||||
call hs_office.createHsOfficeContactTestData('twelfth contact');
|
call hs_office.contact_create_test_data('twelfth contact');
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
--//
|
--//
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
Creates a single person test record.
|
Creates a single person test record.
|
||||||
*/
|
*/
|
||||||
create or replace procedure createHsOfficePersonTestData(
|
create or replace procedure hs_office.person_create_test_data(
|
||||||
newPersonType hs_office.PersonType,
|
newPersonType hs_office.PersonType,
|
||||||
newTradeName varchar,
|
newTradeName varchar,
|
||||||
newFamilyName varchar = null,
|
newFamilyName varchar = null,
|
||||||
@ -32,23 +32,6 @@ begin
|
|||||||
end; $$;
|
end; $$;
|
||||||
--//
|
--//
|
||||||
|
|
||||||
/*
|
|
||||||
Creates a range of test persons for mass data generation.
|
|
||||||
*/
|
|
||||||
create or replace procedure createTestPersonTestData(
|
|
||||||
startCount integer, -- count of auto generated rows before the run
|
|
||||||
endCount integer -- count of auto generated rows after the run
|
|
||||||
)
|
|
||||||
language plpgsql as $$
|
|
||||||
begin
|
|
||||||
for t in startCount..endCount
|
|
||||||
loop
|
|
||||||
call createHsOfficePersonTestData('LP', base.intToVarChar(t, 4));
|
|
||||||
commit;
|
|
||||||
end loop;
|
|
||||||
end; $$;
|
|
||||||
--//
|
|
||||||
|
|
||||||
|
|
||||||
-- ============================================================================
|
-- ============================================================================
|
||||||
--changeset michael.hoennig:hs-office-person-TEST-DATA-GENERATION –context=dev,tc endDelimiter:--//
|
--changeset michael.hoennig:hs-office-person-TEST-DATA-GENERATION –context=dev,tc endDelimiter:--//
|
||||||
@ -56,19 +39,19 @@ end; $$;
|
|||||||
|
|
||||||
do language plpgsql $$
|
do language plpgsql $$
|
||||||
begin
|
begin
|
||||||
call createHsOfficePersonTestData('LP', 'Hostsharing eG');
|
call hs_office.person_create_test_data('LP', 'Hostsharing eG');
|
||||||
call createHsOfficePersonTestData('LP', 'First GmbH');
|
call hs_office.person_create_test_data('LP', 'First GmbH');
|
||||||
call createHsOfficePersonTestData('NP', null, 'Firby', 'Susan');
|
call hs_office.person_create_test_data('NP', null, 'Firby', 'Susan');
|
||||||
call createHsOfficePersonTestData('NP', null, 'Smith', 'Peter');
|
call hs_office.person_create_test_data('NP', null, 'Smith', 'Peter');
|
||||||
call createHsOfficePersonTestData('NP', null, 'Tucker', 'Jack');
|
call hs_office.person_create_test_data('NP', null, 'Tucker', 'Jack');
|
||||||
call createHsOfficePersonTestData('NP', null, 'Fouler', 'Ellie');
|
call hs_office.person_create_test_data('NP', null, 'Fouler', 'Ellie');
|
||||||
call createHsOfficePersonTestData('LP', 'Second e.K.', 'Smith', 'Peter');
|
call hs_office.person_create_test_data('LP', 'Second e.K.', 'Smith', 'Peter');
|
||||||
call createHsOfficePersonTestData('IF', 'Third OHG');
|
call hs_office.person_create_test_data('IF', 'Third OHG');
|
||||||
call createHsOfficePersonTestData('LP', 'Fourth eG');
|
call hs_office.person_create_test_data('LP', 'Fourth eG');
|
||||||
call createHsOfficePersonTestData('UF', 'Erben Bessler', 'Mel', 'Bessler');
|
call hs_office.person_create_test_data('UF', 'Erben Bessler', 'Mel', 'Bessler');
|
||||||
call createHsOfficePersonTestData('NP', null, 'Bessler', 'Anita');
|
call hs_office.person_create_test_data('NP', null, 'Bessler', 'Anita');
|
||||||
call createHsOfficePersonTestData('NP', null, 'Bessler', 'Bert');
|
call hs_office.person_create_test_data('NP', null, 'Bessler', 'Bert');
|
||||||
call createHsOfficePersonTestData('NP', null, 'Winkler', 'Paul');
|
call hs_office.person_create_test_data('NP', null, 'Winkler', 'Paul');
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
--//
|
--//
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
Creates a single relation test record.
|
Creates a single relation test record.
|
||||||
*/
|
*/
|
||||||
create or replace procedure createHsOfficeRelationTestData(
|
create or replace procedure hs_office.relation_create_test_data(
|
||||||
holderPersonName varchar,
|
holderPersonName varchar,
|
||||||
relationType hs_office.RelationType,
|
relationType hs_office.RelationType,
|
||||||
anchorPersonName varchar,
|
anchorPersonName varchar,
|
||||||
@ -58,7 +58,7 @@ end; $$;
|
|||||||
/*
|
/*
|
||||||
Creates a range of test relation for mass data generation.
|
Creates a range of test relation for mass data generation.
|
||||||
*/
|
*/
|
||||||
create or replace procedure createHsOfficeRelationTestData(
|
create or replace procedure hs_office.relation_create_test_data(
|
||||||
startCount integer, -- count of auto generated rows before the run
|
startCount integer, -- count of auto generated rows before the run
|
||||||
endCount integer -- count of auto generated rows after the run
|
endCount integer -- count of auto generated rows after the run
|
||||||
)
|
)
|
||||||
@ -72,7 +72,7 @@ begin
|
|||||||
select p.* from hs_office.person p where tradeName = base.intToVarChar(t, 4) into person;
|
select p.* from hs_office.person p where tradeName = base.intToVarChar(t, 4) into person;
|
||||||
select c.* from hs_office.contact c where c.caption = base.intToVarChar(t, 4) || '#' || t into contact;
|
select c.* from hs_office.contact c where c.caption = base.intToVarChar(t, 4) || '#' || t into contact;
|
||||||
|
|
||||||
call createHsOfficeRelationTestData(person.uuid, contact.uuid, 'REPRESENTATIVE');
|
call hs_office.relation_create_test_data(person.uuid, contact.uuid, 'REPRESENTATIVE');
|
||||||
commit;
|
commit;
|
||||||
end loop;
|
end loop;
|
||||||
end; $$;
|
end; $$;
|
||||||
@ -87,25 +87,25 @@ do language plpgsql $$
|
|||||||
begin
|
begin
|
||||||
call base.defineContext('creating relation test-data', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
call base.defineContext('creating relation test-data', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
||||||
|
|
||||||
call createHsOfficeRelationTestData('First GmbH', 'PARTNER', 'Hostsharing eG', 'first contact');
|
call hs_office.relation_create_test_data('First GmbH', 'PARTNER', 'Hostsharing eG', 'first contact');
|
||||||
call createHsOfficeRelationTestData('Firby', 'REPRESENTATIVE', 'First GmbH', 'first contact');
|
call hs_office.relation_create_test_data('Firby', 'REPRESENTATIVE', 'First GmbH', 'first contact');
|
||||||
call createHsOfficeRelationTestData('First GmbH', 'DEBITOR', 'First GmbH', 'first contact');
|
call hs_office.relation_create_test_data('First GmbH', 'DEBITOR', 'First GmbH', 'first contact');
|
||||||
|
|
||||||
call createHsOfficeRelationTestData('Second e.K.', 'PARTNER', 'Hostsharing eG', 'second contact');
|
call hs_office.relation_create_test_data('Second e.K.', 'PARTNER', 'Hostsharing eG', 'second contact');
|
||||||
call createHsOfficeRelationTestData('Smith', 'REPRESENTATIVE', 'Second e.K.', 'second contact');
|
call hs_office.relation_create_test_data('Smith', 'REPRESENTATIVE', 'Second e.K.', 'second contact');
|
||||||
call createHsOfficeRelationTestData('Second e.K.', 'DEBITOR', 'Second e.K.', 'second contact');
|
call hs_office.relation_create_test_data('Second e.K.', 'DEBITOR', 'Second e.K.', 'second contact');
|
||||||
|
|
||||||
call createHsOfficeRelationTestData('Third OHG', 'PARTNER', 'Hostsharing eG', 'third contact');
|
call hs_office.relation_create_test_data('Third OHG', 'PARTNER', 'Hostsharing eG', 'third contact');
|
||||||
call createHsOfficeRelationTestData('Tucker', 'REPRESENTATIVE', 'Third OHG', 'third contact');
|
call hs_office.relation_create_test_data('Tucker', 'REPRESENTATIVE', 'Third OHG', 'third contact');
|
||||||
call createHsOfficeRelationTestData('Third OHG', 'DEBITOR', 'Third OHG', 'third contact');
|
call hs_office.relation_create_test_data('Third OHG', 'DEBITOR', 'Third OHG', 'third contact');
|
||||||
|
|
||||||
call createHsOfficeRelationTestData('Fourth eG', 'PARTNER', 'Hostsharing eG', 'fourth contact');
|
call hs_office.relation_create_test_data('Fourth eG', 'PARTNER', 'Hostsharing eG', 'fourth contact');
|
||||||
call createHsOfficeRelationTestData('Fouler', 'REPRESENTATIVE', 'Third OHG', 'third contact');
|
call hs_office.relation_create_test_data('Fouler', 'REPRESENTATIVE', 'Third OHG', 'third contact');
|
||||||
call createHsOfficeRelationTestData('Third OHG', 'DEBITOR', 'Third OHG', 'third contact');
|
call hs_office.relation_create_test_data('Third OHG', 'DEBITOR', 'Third OHG', 'third contact');
|
||||||
|
|
||||||
call createHsOfficeRelationTestData('Smith', 'PARTNER', 'Hostsharing eG', 'sixth contact');
|
call hs_office.relation_create_test_data('Smith', 'PARTNER', 'Hostsharing eG', 'sixth contact');
|
||||||
call createHsOfficeRelationTestData('Smith', 'DEBITOR', 'Smith', 'third contact');
|
call hs_office.relation_create_test_data('Smith', 'DEBITOR', 'Smith', 'third contact');
|
||||||
call createHsOfficeRelationTestData('Smith', 'SUBSCRIBER', 'Third OHG', 'third contact', 'members-announce');
|
call hs_office.relation_create_test_data('Smith', 'SUBSCRIBER', 'Third OHG', 'third contact', 'members-announce');
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
--//
|
--//
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
Creates a single partner test record.
|
Creates a single partner test record.
|
||||||
*/
|
*/
|
||||||
create or replace procedure hs_office.createHsOfficePartnerTestData(
|
create or replace procedure hs_office.partner_create_test_data(
|
||||||
mandantTradeName varchar,
|
mandantTradeName varchar,
|
||||||
newPartnerNumber numeric(5),
|
newPartnerNumber numeric(5),
|
||||||
partnerPersonName varchar,
|
partnerPersonName varchar,
|
||||||
@ -73,11 +73,11 @@ do language plpgsql $$
|
|||||||
begin
|
begin
|
||||||
call base.defineContext('creating partner test-data ', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
call base.defineContext('creating partner test-data ', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
||||||
|
|
||||||
call hs_office.createHsOfficePartnerTestData('Hostsharing eG', 10001, 'First GmbH', 'first contact');
|
call hs_office.partner_create_test_data('Hostsharing eG', 10001, 'First GmbH', 'first contact');
|
||||||
call hs_office.createHsOfficePartnerTestData('Hostsharing eG', 10002, 'Second e.K.', 'second contact');
|
call hs_office.partner_create_test_data('Hostsharing eG', 10002, 'Second e.K.', 'second contact');
|
||||||
call hs_office.createHsOfficePartnerTestData('Hostsharing eG', 10003, 'Third OHG', 'third contact');
|
call hs_office.partner_create_test_data('Hostsharing eG', 10003, 'Third OHG', 'third contact');
|
||||||
call hs_office.createHsOfficePartnerTestData('Hostsharing eG', 10004, 'Fourth eG', 'fourth contact');
|
call hs_office.partner_create_test_data('Hostsharing eG', 10004, 'Fourth eG', 'fourth contact');
|
||||||
call hs_office.createHsOfficePartnerTestData('Hostsharing eG', 10010, 'Smith', 'fifth contact');
|
call hs_office.partner_create_test_data('Hostsharing eG', 10010, 'Smith', 'fifth contact');
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
--//
|
--//
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
Creates a single bankaccount test record.
|
Creates a single bankaccount test record.
|
||||||
*/
|
*/
|
||||||
create or replace procedure hs_office.createHsOfficeBankAccountTestData(givenHolder varchar, givenIBAN varchar, givenBIC varchar)
|
create or replace procedure hs_office.bankaccount_create_test_data(givenHolder varchar, givenIBAN varchar, givenBIC varchar)
|
||||||
language plpgsql as $$
|
language plpgsql as $$
|
||||||
declare
|
declare
|
||||||
emailAddr varchar;
|
emailAddr varchar;
|
||||||
@ -34,13 +34,13 @@ do language plpgsql $$
|
|||||||
call base.defineContext('creating bankaccount test-data');
|
call base.defineContext('creating bankaccount test-data');
|
||||||
|
|
||||||
-- IBANs+BICs taken from https://ibanvalidieren.de/beispiele.html
|
-- IBANs+BICs taken from https://ibanvalidieren.de/beispiele.html
|
||||||
call hs_office.createHsOfficeBankAccountTestData('First GmbH', 'DE02120300000000202051', 'BYLADEM1001');
|
call hs_office.bankaccount_create_test_data('First GmbH', 'DE02120300000000202051', 'BYLADEM1001');
|
||||||
call hs_office.createHsOfficeBankAccountTestData('Peter Smith', 'DE02500105170137075030', 'INGDDEFF');
|
call hs_office.bankaccount_create_test_data('Peter Smith', 'DE02500105170137075030', 'INGDDEFF');
|
||||||
call hs_office.createHsOfficeBankAccountTestData('Second e.K.', 'DE02100500000054540402', 'BELADEBE');
|
call hs_office.bankaccount_create_test_data('Second e.K.', 'DE02100500000054540402', 'BELADEBE');
|
||||||
call hs_office.createHsOfficeBankAccountTestData('Third OHG', 'DE02300209000106531065', 'CMCIDEDD');
|
call hs_office.bankaccount_create_test_data('Third OHG', 'DE02300209000106531065', 'CMCIDEDD');
|
||||||
call hs_office.createHsOfficeBankAccountTestData('Fourth eG', 'DE02200505501015871393', 'HASPDEHH');
|
call hs_office.bankaccount_create_test_data('Fourth eG', 'DE02200505501015871393', 'HASPDEHH');
|
||||||
call hs_office.createHsOfficeBankAccountTestData('Mel Bessler', 'DE02100100100006820101', 'PBNKDEFF');
|
call hs_office.bankaccount_create_test_data('Mel Bessler', 'DE02100100100006820101', 'PBNKDEFF');
|
||||||
call hs_office.createHsOfficeBankAccountTestData('Anita Bessler', 'DE02300606010002474689', 'DAAEDEDD');
|
call hs_office.bankaccount_create_test_data('Anita Bessler', 'DE02300606010002474689', 'DAAEDEDD');
|
||||||
call hs_office.createHsOfficeBankAccountTestData('Paul Winkler', 'DE02600501010002034304', 'SOLADEST600');
|
call hs_office.bankaccount_create_test_data('Paul Winkler', 'DE02600501010002034304', 'SOLADEST600');
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
Creates a single debitor test record.
|
Creates a single debitor test record.
|
||||||
*/
|
*/
|
||||||
create or replace procedure hs_office.createHsOfficeDebitorTestData(
|
create or replace procedure hs_office.debitor_create_test_data(
|
||||||
withDebitorNumberSuffix numeric(5),
|
withDebitorNumberSuffix numeric(5),
|
||||||
forPartnerPersonName varchar,
|
forPartnerPersonName varchar,
|
||||||
forBillingContactCaption varchar,
|
forBillingContactCaption varchar,
|
||||||
@ -52,9 +52,9 @@ do language plpgsql $$
|
|||||||
begin
|
begin
|
||||||
call base.defineContext('creating debitor test-data', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
call base.defineContext('creating debitor test-data', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
||||||
|
|
||||||
call hs_office.createHsOfficeDebitorTestData(11, 'First GmbH', 'first contact', 'fir');
|
call hs_office.debitor_create_test_data(11, 'First GmbH', 'first contact', 'fir');
|
||||||
call hs_office.createHsOfficeDebitorTestData(12, 'Second e.K.', 'second contact', 'sec');
|
call hs_office.debitor_create_test_data(12, 'Second e.K.', 'second contact', 'sec');
|
||||||
call hs_office.createHsOfficeDebitorTestData(13, 'Third OHG', 'third contact', 'thi');
|
call hs_office.debitor_create_test_data(13, 'Third OHG', 'third contact', 'thi');
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
--//
|
--//
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
Creates a single sepaMandate test record.
|
Creates a single sepaMandate test record.
|
||||||
*/
|
*/
|
||||||
create or replace procedure hs_office.createHsOfficeSepaMandateTestData(
|
create or replace procedure hs_office.sepamandate_create_test_data(
|
||||||
forPartnerNumber numeric(5),
|
forPartnerNumber numeric(5),
|
||||||
forDebitorSuffix char(2),
|
forDebitorSuffix char(2),
|
||||||
forIban varchar,
|
forIban varchar,
|
||||||
@ -45,9 +45,9 @@ do language plpgsql $$
|
|||||||
begin
|
begin
|
||||||
call base.defineContext('creating SEPA-mandate test-data', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
call base.defineContext('creating SEPA-mandate test-data', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
||||||
|
|
||||||
call hs_office.createHsOfficeSepaMandateTestData(10001, '11', 'DE02120300000000202051', 'ref-10001-11');
|
call hs_office.sepamandate_create_test_data(10001, '11', 'DE02120300000000202051', 'ref-10001-11');
|
||||||
call hs_office.createHsOfficeSepaMandateTestData(10002, '12', 'DE02100500000054540402', 'ref-10002-12');
|
call hs_office.sepamandate_create_test_data(10002, '12', 'DE02100500000054540402', 'ref-10002-12');
|
||||||
call hs_office.createHsOfficeSepaMandateTestData(10003, '13', 'DE02300209000106531065', 'ref-10003-13');
|
call hs_office.sepamandate_create_test_data(10003, '13', 'DE02300209000106531065', 'ref-10003-13');
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
--//
|
--//
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
Creates a single membership test record.
|
Creates a single membership test record.
|
||||||
*/
|
*/
|
||||||
create or replace procedure hs_office.createHsOfficeMembershipTestData(
|
create or replace procedure hs_office.membership_create_test_data(
|
||||||
forPartnerNumber numeric(5),
|
forPartnerNumber numeric(5),
|
||||||
newMemberNumberSuffix char(2) )
|
newMemberNumberSuffix char(2) )
|
||||||
language plpgsql as $$
|
language plpgsql as $$
|
||||||
@ -35,9 +35,9 @@ do language plpgsql $$
|
|||||||
begin
|
begin
|
||||||
call base.defineContext('creating Membership test-data', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
call base.defineContext('creating Membership test-data', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
||||||
|
|
||||||
call hs_office.createHsOfficeMembershipTestData(10001, '01');
|
call hs_office.membership_create_test_data(10001, '01');
|
||||||
call hs_office.createHsOfficeMembershipTestData(10002, '02');
|
call hs_office.membership_create_test_data(10002, '02');
|
||||||
call hs_office.createHsOfficeMembershipTestData(10003, '03');
|
call hs_office.membership_create_test_data(10003, '03');
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
--//
|
--//
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
Creates a single coopSharesTransaction test record.
|
Creates a single coopSharesTransaction test record.
|
||||||
*/
|
*/
|
||||||
create or replace procedure hs_office.createHsOfficeCoopSharesTransactionTestData(
|
create or replace procedure hs_office.coopsharetx_create_test_data(
|
||||||
givenPartnerNumber numeric,
|
givenPartnerNumber numeric,
|
||||||
givenMemberNumberSuffix char(2)
|
givenMemberNumberSuffix char(2)
|
||||||
)
|
)
|
||||||
@ -46,8 +46,8 @@ do language plpgsql $$
|
|||||||
call base.defineContext('creating coopSharesTransaction test-data');
|
call base.defineContext('creating coopSharesTransaction test-data');
|
||||||
SET CONSTRAINTS ALL DEFERRED;
|
SET CONSTRAINTS ALL DEFERRED;
|
||||||
|
|
||||||
call hs_office.createHsOfficeCoopSharesTransactionTestData(10001, '01');
|
call hs_office.coopsharetx_create_test_data(10001, '01');
|
||||||
call hs_office.createHsOfficeCoopSharesTransactionTestData(10002, '02');
|
call hs_office.coopsharetx_create_test_data(10002, '02');
|
||||||
call hs_office.createHsOfficeCoopSharesTransactionTestData(10003, '03');
|
call hs_office.coopsharetx_create_test_data(10003, '03');
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
Creates a single coopAssetsTransaction test record.
|
Creates a single coopAssetsTransaction test record.
|
||||||
*/
|
*/
|
||||||
create or replace procedure hs_office.createHsOfficeCoopAssetsTransactionTestData(
|
create or replace procedure hs_office.coopassettx_create_test_data(
|
||||||
givenPartnerNumber numeric,
|
givenPartnerNumber numeric,
|
||||||
givenMemberNumberSuffix char(2)
|
givenMemberNumberSuffix char(2)
|
||||||
)
|
)
|
||||||
@ -46,8 +46,8 @@ do language plpgsql $$
|
|||||||
call base.defineContext('creating coopAssetsTransaction test-data');
|
call base.defineContext('creating coopAssetsTransaction test-data');
|
||||||
SET CONSTRAINTS ALL DEFERRED;
|
SET CONSTRAINTS ALL DEFERRED;
|
||||||
|
|
||||||
call hs_office.createHsOfficeCoopAssetsTransactionTestData(10001, '01');
|
call hs_office.coopassettx_create_test_data(10001, '01');
|
||||||
call hs_office.createHsOfficeCoopAssetsTransactionTestData(10002, '02');
|
call hs_office.coopassettx_create_test_data(10002, '02');
|
||||||
call hs_office.createHsOfficeCoopAssetsTransactionTestData(10003, '03');
|
call hs_office.coopassettx_create_test_data(10003, '03');
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
Creates a single hs_booking.project test record.
|
Creates a single hs_booking.project test record.
|
||||||
*/
|
*/
|
||||||
create or replace procedure createHsBookingProjectTransactionTestData(
|
create or replace procedure hs_booking.project_create_test_data(
|
||||||
givenPartnerNumber numeric,
|
givenPartnerNumber numeric,
|
||||||
givenDebitorSuffix char(2)
|
givenDebitorSuffix char(2)
|
||||||
)
|
)
|
||||||
@ -41,9 +41,9 @@ do language plpgsql $$
|
|||||||
begin
|
begin
|
||||||
call base.defineContext('creating booking-project test-data', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
call base.defineContext('creating booking-project test-data', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
||||||
|
|
||||||
call createHsBookingProjectTransactionTestData(10001, '11');
|
call hs_booking.project_create_test_data(10001, '11');
|
||||||
call createHsBookingProjectTransactionTestData(10002, '12');
|
call hs_booking.project_create_test_data(10002, '12');
|
||||||
call createHsBookingProjectTransactionTestData(10003, '13');
|
call hs_booking.project_create_test_data(10003, '13');
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
--//
|
--//
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
Creates a single hs_booking.item test record.
|
Creates a single hs_booking.item test record.
|
||||||
*/
|
*/
|
||||||
create or replace procedure hs_booking.createHsBookingItemTransactionTestData(
|
create or replace procedure hs_booking.item_create_test_data(
|
||||||
givenPartnerNumber numeric,
|
givenPartnerNumber numeric,
|
||||||
givenDebitorSuffix char(2)
|
givenDebitorSuffix char(2)
|
||||||
)
|
)
|
||||||
@ -49,9 +49,9 @@ do language plpgsql $$
|
|||||||
begin
|
begin
|
||||||
call base.defineContext('creating booking-item test-data', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
call base.defineContext('creating booking-item test-data', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
||||||
|
|
||||||
call hs_booking.createHsBookingItemTransactionTestData(10001, '11');
|
call hs_booking.item_create_test_data(10001, '11');
|
||||||
call hs_booking.createHsBookingItemTransactionTestData(10002, '12');
|
call hs_booking.item_create_test_data(10002, '12');
|
||||||
call hs_booking.createHsBookingItemTransactionTestData(10003, '13');
|
call hs_booking.item_create_test_data(10003, '13');
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
--//
|
--//
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
Creates a single hs_hosting.asset test record.
|
Creates a single hs_hosting.asset test record.
|
||||||
*/
|
*/
|
||||||
create or replace procedure hs_office.createHsHostingAssetTestData(givenProjectCaption varchar)
|
create or replace procedure hs_hosting.asset_create_test_data(givenProjectCaption varchar)
|
||||||
language plpgsql as $$
|
language plpgsql as $$
|
||||||
declare
|
declare
|
||||||
relatedProject hs_booking.project;
|
relatedProject hs_booking.project;
|
||||||
@ -112,9 +112,9 @@ do language plpgsql $$
|
|||||||
begin
|
begin
|
||||||
call base.defineContext('creating hosting-asset test-data', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
call base.defineContext('creating hosting-asset test-data', null, 'superuser-alex@hostsharing.net', 'rbac.global#global:ADMIN');
|
||||||
|
|
||||||
call hs_office.createHsHostingAssetTestData('D-1000111 default project');
|
call hs_hosting.asset_create_test_data('D-1000111 default project');
|
||||||
call hs_office.createHsHostingAssetTestData('D-1000212 default project');
|
call hs_hosting.asset_create_test_data('D-1000212 default project');
|
||||||
call hs_office.createHsHostingAssetTestData('D-1000313 default project');
|
call hs_hosting.asset_create_test_data('D-1000313 default project');
|
||||||
end;
|
end;
|
||||||
$$;
|
$$;
|
||||||
--//
|
--//
|
||||||
|
Loading…
Reference in New Issue
Block a user