V193: create extension_licensing tables that V100 silently skipped#2
Open
Mounika-2311 wants to merge 1 commit into
Open
V193: create extension_licensing tables that V100 silently skipped#2Mounika-2311 wants to merge 1 commit into
Mounika-2311 wants to merge 1 commit into
Conversation
V100 was originally fix_system_menu_icon.sql (now V186). When V100 was replaced by extension_licensing.sql, Flyway's repair updated the V100 checksum without re-running — so extension_licenses/extension_usage/ extension_vendors were never created in envs where original V100 had already run. Hibernate's schema validation rejects startup with "missing table [extension_licenses]". V193 idempotently creates the tables with the same schema as the orphaned V100. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
sivakumard
added a commit
that referenced
this pull request
May 14, 2026
I have updated SignUp and Login backend part here for Ciyex app
90061da to
9836612
Compare
528d35b to
4ba1daf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add Flyway migration V193 to create the
extension_licenses,extension_usage, andextension_vendorstables. These tables back the Ciyex Workspace marketplaceLicensingControllerand the JPA entityorg.ciyex.ehr.licensing.entity.ExtensionLicense, but they do not exist in any environment that ran our earlier migrations — even thoughV100__extension_licensing.sqlis present in the repo.Why the tables are missing
There were two different
V100migrations over the lifetime of this repo:V100__fix_system_menu_icon.sql— applied long ago in dev/stage/prod. Recorded in each cluster'sflyway_schema_historywith V100's checksum at that time.V100__extension_licensing.sql— added in commit `f60fe9cb` ("Add extension licensing API for Ciyex Workspace marketplace", 2026-04-07). Commit `4f987424` ("fix: rename duplicate V100 flyway migration to V186", 2026-04-08) renamed the original menu-icon migration to V186 and left the licensing one as V100.When pods later restarted, Flyway saw a checksum mismatch on V100, ran
repair(called automatically on startup in this app), and silently rewrote the history row's checksum to match the new V100 file.repairdoes not execute the new migration content. As a result, V100 is recorded as "applied" with the licensing checksum, but the licensing tables were never created.Why this surfaced now during the prod rollout
The currently running
0.1.2pods in production are 22 days old. They were started before the marketplace code (`f60fe9cb`) was added, so their image content has noExtensionLicenseJPA entity and Hibernate never inspectsextension_licenses. Promoting0.1.4pulled the new image, Hibernate ran withspring.jpa.hibernate.ddl-auto: validate(per application-prod.yml), and startup failed with:```
SchemaManagementException: Schema validation: missing table [extension_licenses]
```
The deployment surface was protected only because k8s held the old pods serving while the new ones CrashLooped — but any restart of those old pods would have re-pulled the now-broken
0.1.2tag and taken prod down.What this migration does
V193 idempotently creates the three tables with the same DDL as the orphaned V100, using
CREATE TABLE IF NOT EXISTSandCREATE INDEX IF NOT EXISTSso it is a no-op anywhere the original V100 did execute (e.g. fresh dev installs from scratch).Test plan
0.1.4rollout (pods reached1/1 Ready).\\dt extension_licensesshows the table on dev / stage / DR.GET /api/licensing/{extId},POST /api/licensing/{extId}/checkout,POST /api/licensing/webhook/stripe.ddl-auto: validateno longer logsmissing tablewarnings.