Compare commits

...

1 Commits

Author SHA1 Message Date
Timotheus Pokorra
0d0a913466 create database only with office tables 2025-01-23 09:39:02 +01:00
2 changed files with 4 additions and 76 deletions

View File

@ -51,37 +51,6 @@ databaseChangeLog:
- include:
file: db/changelog/1-rbac/1080-rbac-global.sql
- include:
file: db/changelog/2-rbactest/200-rbactest-schema.sql
context: "!without-test-data"
- include:
file: db/changelog/2-rbactest/201-rbactest-customer/2010-rbactest-customer.sql
context: "!without-test-data"
- include:
file: db/changelog/2-rbactest/201-rbactest-customer/2013-rbactest-customer-rbac.sql
context: "!without-test-data"
- include:
file: db/changelog/2-rbactest/201-rbactest-customer/2018-rbactest-customer-test-data.sql
context: "!without-test-data"
- include:
file: db/changelog/2-rbactest/202-rbactest-package/2020-rbactest-package.sql
context: "!without-test-data"
- include:
file: db/changelog/2-rbactest/202-rbactest-package/2023-rbactest-package-rbac.sql
context: "!without-test-data"
- include:
file: db/changelog/2-rbactest/202-rbactest-package/2028-rbactest-package-test-data.sql
context: "!without-test-data"
- include:
file: db/changelog/2-rbactest/203-rbactest-domain/2030-rbactest-domain.sql
context: "!without-test-data"
- include:
file: db/changelog/2-rbactest/203-rbactest-domain/2033-rbactest-domain-rbac.sql
context: "!without-test-data"
- include:
file: db/changelog/2-rbactest/203-rbactest-domain/2038-rbactest-domain-test-data.sql
context: "!without-test-data"
- include:
file: db/changelog/5-hs-office/500-hs-office-schema.sql
- include:
@ -167,51 +136,6 @@ databaseChangeLog:
file: db/changelog/5-hs-office/512-coopassets/5128-hs-office-coopassets-test-data.sql
context: "!without-test-data"
- include:
file: db/changelog/6-hs-booking/600-hs-booking-schema.sql
context: "!only-office"
- include:
file: db/changelog/6-hs-booking/610-booking-debitor/6100-hs-booking-debitor.sql
context: "!only-office"
- include:
file: db/changelog/6-hs-booking/620-booking-project/6200-hs-booking-project.sql
context: "!only-office"
- include:
file: db/changelog/6-hs-booking/620-booking-project/6203-hs-booking-project-rbac.sql
context: "!only-office"
- include:
file: db/changelog/6-hs-booking/620-booking-project/6208-hs-booking-project-test-data.sql
context: "!only-office and !without-test-data"
- include:
file: db/changelog/6-hs-booking/630-booking-item/6300-hs-booking-item.sql
context: "!only-office"
- include:
file: db/changelog/6-hs-booking/630-booking-item/6303-hs-booking-item-rbac.sql
context: "!only-office"
- include:
file: db/changelog/6-hs-booking/630-booking-item/6308-hs-booking-item-test-data.sql
context: "!only-office and !without-test-data"
- include:
file: db/changelog/7-hs-hosting/700-hs-hosting-schema.sql
context: "!only-office"
- include:
file: db/changelog/7-hs-hosting/701-hosting-asset/7010-hs-hosting-asset.sql
context: "!only-office"
- include:
file: db/changelog/7-hs-hosting/701-hosting-asset/7013-hs-hosting-asset-rbac.sql
context: "!only-office"
- include:
file: db/changelog/7-hs-hosting/701-hosting-asset/7016-hs-hosting-asset-migration.sql
context: "!only-office"
- include:
file: db/changelog/7-hs-hosting/701-hosting-asset/7018-hs-hosting-asset-test-data.sql
context: "!only-office and !without-test-data"
- include:
file: db/changelog/9-hs-global/9000-statistics.sql
context: "!only-office"
- include:
file: db/changelog/9-hs-global/9100-hs-integration-schema.sql
- include:

View File

@ -252,12 +252,14 @@ public class CsvDataImport extends ContextBasedTest {
jpaAttempt.transacted(() -> {
context(rbacSuperuser);
// TODO.perf: could we instead skip creating test-data based on an env var?
/*
em.createNativeQuery("delete from hs_hosting.asset where true").executeUpdate();
em.createNativeQuery("delete from hs_hosting.asset_ex where true").executeUpdate();
em.createNativeQuery("delete from hs_booking.item where true").executeUpdate();
em.createNativeQuery("delete from hs_booking.item_ex where true").executeUpdate();
em.createNativeQuery("delete from hs_booking.project where true").executeUpdate();
em.createNativeQuery("delete from hs_booking.project_ex where true").executeUpdate();
*/
em.createNativeQuery("delete from hs_office.coopassettx where true").executeUpdate();
em.createNativeQuery("delete from hs_office.coopassettx_legacy_id where true").executeUpdate();
em.createNativeQuery("delete from hs_office.coopsharetx where true").executeUpdate();
@ -293,9 +295,11 @@ public class CsvDataImport extends ContextBasedTest {
protected void deleteFromTestTables() {
jpaAttempt.transacted(() -> {
context(rbacSuperuser);
/*
em.createNativeQuery("delete from rbactest.domain where true").executeUpdate();
em.createNativeQuery("delete from rbactest.package where true").executeUpdate();
em.createNativeQuery("delete from rbactest.customer where true").executeUpdate();
*/
}).assertSuccessful();
}