Add the master-scope columns to notes

FeatureInitializerService
Ya
22 Agosti 2026, 08:51 UTC
Mwandishi
Kamo
Ahadi ya
801dc29

MASTER_SCOPE ('MEMBER' / 'ORG' / NULL) and ORGANIZATION_ID, plus the two indexes the entity declares and a partial unique index per scope so one live master note per member and per organisation is enforced by the database rather than only by the find-then-create in NotesService. No backfill: every existing note is an ordinary note and NULL reads as exactly that. The master notes themselves are provisioned lazily on the first read that wants them, which covers memberships and organisations created after this runs without a second migration. @Order(0), like every column-add runner: the moment the shared library maps these columns, any runner that loads a Note through JPA emits them in its SELECT, so a migration ordered late is never reached. Applied to Yugabyte 2026-08-22: all seven statements applied, both columns and all four indexes verified present.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei