PAR-242
0
Business IT harness: build schema from economy-flyway migrations, not a bundled schema.sql (CI red)
Pending ReleaseUnassignedBusinessBug
Problem
The Business · Test & Coverage workflow is failing on every push: its "Apply schema to MariaDB service" step runs mariadb … < business/src/main/resources/sql/schema.sql, but that snapshot was removed in the monorepo migration (No such file or directory). The embedded path is equally broken — MariadbContainerExtension.startEmbeddedDb() calls applySql("test-prelude.sql") + applySql("sql/schema.sql"), the latter not on the classpath (sql/schema.sql not on test classpath).
This is the same defect PAR-239 fixed for Treasury, never ported to Business. The bundled snapshot also duplicated the authoritative economy-flyway schema (drift risk).
Fix (mirror PAR-239)
MariadbContainerExtensionruns the authoritative economy-flyway migrations with Flyway (classpath:db/migration) on the DataSource — embedded MariaDB4j locally, the MariaDB service container in CI. economy-flyway V1 already definesuuid_to_bin/bin_to_uuid,accounts, and everyfirm_*table the ITs use, so thetest-prelude.sqlstub (UUID helpers + stub accounts) is no longer needed.business/build.gradle.ktsaddsflyway-core+flyway-mysql(test scope) and stages the economy-flyway migrations onto the test classpath viaprocessTestResources.business-test.ymldrops the manualmariadb-clientinstall +test-prelude.sql/schema.sqlapply steps; the service container just provides an emptybusiness_testDB. Pin the service tomariadb:10.11to match Treasury + local MariaDB4j (avoids the MariaDB 11 flaky-trigger issue now that Business applies the sameaccount_balances_mattriggers).- Delete the now-unused
business/src/test/resources/test-prelude.sql.
Acceptance
Business · Test & Coverageis green: ITs build the schema via Flyway, run, and the 95% coverage gate passes.- No bundled
schema.sql/test-prelude.sql; Business and prod share one schema source of truth.
Comments
No comments yet.
Activity
- tesks changed status to Status → Pending Release
- tesks created the issue