Commits
Tarun Sukhani authored 9045d608982
fix(db): declare module_key NOT NULL before adding it to the PK in alterForModuleSupport (PF-144) The legacy single-module -> multi-module upgrade added module_key as a nullable column, then tried to make it part of the composite primary key (id, module_key) without ever declaring it NOT NULL. H2 (the framework default) and other strict DBs reject a nullable column in a primary key with 'Column "MODULE_KEY" must not be nullable', and the exception is swallowed by listDatabaseEvolutions (logged only) so the upgrade silently half-completes. Add an explicit, dialect-aware NOT NULL step after the backfill and before the PK change (MySQL: modify ...; else: alter column ... set not null). Re-add a clean H2 legacy-upgrade test that asserts the full migration completes, including the composite PK being in place. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 0e09240d0338d6ba73448084020a3fac677330c3)