Skip to content

Commit 6c6dc81

Browse files
jeffjensenclaude
andcommitted
fix(archetype): Drop the MySQL/MariaDB Liquibase-table casing workaround
* Core 3.0.0 matches PrimaryKeyPresenceAudit's Liquibase-bookkeeping-table exclusion case-insensitively, so the built-in lower-case constant now excludes MySQL/MariaDB's upper-cased DATABASECHANGELOG/DATABASECHANGELOGLOCK without renaming them. * Verified via the full-mysql archetype self-test. * Update the adding-a-database guide for the dropped workaround. Step 3 and the checklist still told contributors to force lower-case Liquibase bookkeeping-table names for engines that upper-case unquoted identifiers; that workaround is gone now that the audit matches exclusions case-insensitively. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016phSDvM51hkfSYdjcGQrwz
1 parent 6e7064e commit 6c6dc81

2 files changed

Lines changed: 7 additions & 13 deletions

File tree

archetype/src/main/resources/archetype-resources/src/test/resources/application.properties

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
spring.jpa.open-in-view=false
66
spring.jpa.hibernate.ddl-auto=none
77
spring.liquibase.change-log=classpath:db/changelog/db.changelog-master.xml
8-
#if($databasePlatform != 'postgresql')
9-
# MySQL and MariaDB store an unquoted DATABASECHANGELOG uppercase, which the primary-key audit's built-in lowercase
10-
# exclusion (databasechangelog / databasechangeloglock) would miss; name the bookkeeping tables lowercase so it applies.
11-
spring.liquibase.database-change-log-table=databasechangelog
12-
spring.liquibase.database-change-log-lock-table=databasechangeloglock
13-
#end
148

159
# The schema the catalog audits scan; read by the example ITs via @Value("#[[${]]#${schemaPropertyName}#[[}]]#").
1610
#if($databasePlatform != 'postgresql' && $schemaName == 'public')

integration/src/site/asciidoc/adding-a-database.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,18 @@ import org.testcontainers.newengine.NewEngineContainer;
7272
Leave the `preferQueryMode=simple` URL parameter on the PostgreSQL branch only — it is a PostgreSQL JDBC
7373
property the plan audits require, and those audits do not run on other engines.
7474

75-
=== Step 3 — `application.properties`: schema and bookkeeping tables
75+
=== Step 3 — `application.properties`: schema name
7676

77-
In `archetype-resources/src/test/resources/application.properties`, the non-PostgreSQL branch already handles two
78-
divergences; confirm they hold for the new engine, and widen the branch if not:
77+
In `archetype-resources/src/test/resources/application.properties`, confirm the existing non-PostgreSQL branch
78+
holds for the new engine, and widen it if not:
7979

8080
* **Schema name.** MySQL and MariaDB have no `public` schema — their Testcontainers database is `test` — so when
8181
`schemaName` is left at its PostgreSQL-oriented default the harness scans `test` instead. If the new engine
8282
also lacks a `public` schema, the existing `#if($databasePlatform != 'postgresql' && $schemaName == 'public')`
8383
branch covers it.
84-
* **Liquibase bookkeeping tables.** MySQL/MariaDB store the unquoted `DATABASECHANGELOG` upper-cased, which the
85-
primary-key audit's built-in lowercase exclusion would miss; the properties force the lowercase names so the
86-
exclusion applies. Keep this for any engine that upper-cases unquoted identifiers.
84+
85+
The primary-key audit's built-in Liquibase-bookkeeping-table exclusion matches case-insensitively, so an engine
86+
that upper-cases unquoted identifiers (as MySQL/MariaDB do for `DATABASECHANGELOG`) needs no properties workaround.
8787

8888
The Liquibase changelog (`db.changelog-master.xml`) is engine-agnostic by design — note its comment about adding
8989
the foreign key *after* its index so engines that auto-index foreign keys (MySQL, MariaDB) do not create a
@@ -120,7 +120,7 @@ per-platform image default and any schema caveat).
120120
* [ ] Core supports the engine (its own guide) — the integration then audits it with no change.
121121
* [ ] `pom.xml` branch: Testcontainers module + JDBC driver.
122122
* [ ] `DemoDatabaseTestConfig.java` branches: image default, container import, container field + `start()`.
123-
* [ ] `application.properties`: schema remap and bookkeeping-table casing cover the engine.
123+
* [ ] `application.properties`: schema remap covers the engine.
124124
* [ ] `archetype-metadata.xml` doc comment lists the new value; post-generate plan-IT deletion verified.
125125
* [ ] `projects/full-newengine/` self-test sample (`archetype.properties` with the full property list + `goal.txt`).
126126
* [ ] link:archetype.html[Archetype] property table updated; `.\mvnw.cmd clean install` green (Docker required).

0 commit comments

Comments
 (0)