Commit a7e66a5
PR #125 patched defects discovered while booting dev-mysql, but two of
those patches needed to be propagated to other profiles to prevent the
same bugs from biting elsewhere. Audit summarized at
#122
Patch 1 — prod profile flyway.target=2.0.0
application-prod.yml uses MySQL vendor migrations, which means a first
deploy against a clean prod DB would hit the same V3 schema drift
that #125 patched on dev-mysql ("Unknown column 'client_description'").
Added the same target=2.0.0 workaround with a pointer to #123. Will
be removed once #123 lands.
Patch 2 — H2 V1 UNIQUE on oauth2_registered_client.client_id
H2 V1 schema had only PRIMARY KEY (id) on oauth2_registered_client, no
unique constraint on client_id. Not blocking H2 boot today (H2's
espi_application_info table doesn't declare an FK referencing it), but
client_id is unique by OAuth2 semantics and MySQL/PostgreSQL V1 both
enforce uniqueness. Added UNIQUE constraint and removed the now-redundant
non-unique CREATE INDEX, mirroring the MySQL cleanup from #125.
Audited but no change needed
- HikariCP auto-commit (patch #6 from #125): dev-postgresql, local, prod,
and docker all rely on the HikariCP default (true). The dev-mysql
auto-commit: false was an outlier bug, not a shared default.
- PostgreSQL V3 INSERT: PostgreSQL V1 already has the columns V3 targets
(client_description, contact_*, scope, grant_types, response_types).
Different drift pattern from MySQL — no target=2.0.0 workaround needed
on dev-postgresql at this time. (V4-V6 drift TBD as part of #123.)
Refs: #122 #123 #125
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent af638d2 commit a7e66a5
2 files changed
Lines changed: 6 additions & 2 deletions
File tree
- openespi-authserver/src/main/resources
- db/vendor/h2
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
108 | | - | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
0 commit comments