WIP: introduce separate database schemas #102

Closed
hsh-michaelhoennig wants to merge 57 commits from introduce-separate-database-schemas into master
6 changed files with 10 additions and 10 deletions
Showing only changes of commit ffd20a6764 - Show all commits

View File

@ -8,10 +8,10 @@
Returns a textual representation of an integer number to be used as generated test data.
Examples :
intToVarChar(0, 3) => 'aaa'
intToVarChar(1, 3) => 'aab'
basis.intToVarChar(0, 3) => 'aaa'
basis.intToVarChar(1, 3) => 'aab'
*/
create or replace function intToVarChar(i integer, len integer)
create or replace function basis.intToVarChar(i integer, len integer)
returns varchar
language plpgsql as $$
declare
@ -19,7 +19,7 @@ declare
begin
select chr(ascii('a') + i % 26) into partial;
if len > 1 then
return intToVarChar(i / 26, len - 1) || partial;
return basis.intToVarChar(i / 26, len - 1) || partial;
else
return partial;
end if;

View File

@ -59,7 +59,7 @@ create or replace procedure createTestCustomerTestData(
begin
for t in startCount..endCount
loop
call createTestCustomerTestData(testCustomerReference(t), intToVarChar(t, 3));
call createTestCustomerTestData(testCustomerReference(t), basis.intToVarChar(t, 3));
commit;
end loop;
end; $$;

View File

@ -25,7 +25,7 @@ begin
insert
into test_domain (name, packageUuid)
values (pac.name || '-' || intToVarChar(t, 4), pac.uuid);
values (pac.name || '-' || basis.intToVarChar(t, 4), pac.uuid);
end loop;
end; $$;

View File

@ -44,7 +44,7 @@ create or replace procedure createHsOfficeContactTestData(
begin
for t in startCount..endCount
loop
call createHsOfficeContactTestData(intToVarChar(t, 4) || '#' || t);
call createHsOfficeContactTestData(basis.intToVarChar(t, 4) || '#' || t);
commit;
end loop;
end; $$;

View File

@ -43,7 +43,7 @@ create or replace procedure createTestPersonTestData(
begin
for t in startCount..endCount
loop
call createHsOfficePersonTestData('LP', intToVarChar(t, 4));
call createHsOfficePersonTestData('LP', basis.intToVarChar(t, 4));
commit;
end loop;
end; $$;

View File

@ -69,8 +69,8 @@ declare
begin
for t in startCount..endCount
loop
select p.* from hs_office_person p where tradeName = intToVarChar(t, 4) into person;
select c.* from hs_office_contact c where c.caption = intToVarChar(t, 4) || '#' || t into contact;
select p.* from hs_office_person p where tradeName = basis.intToVarChar(t, 4) into person;
select c.* from hs_office_contact c where c.caption = basis.intToVarChar(t, 4) || '#' || t into contact;
call createHsOfficeRelationTestData(person.uuid, contact.uuid, 'REPRESENTATIVE');
commit;