Create the HR Training schema

FeatureInitializerService
Ya
11 Agosti 2026, 16:20 UTC
Mwandishi
Kamo
Ahadi ya
a229d59

Registers com.kamo.z.shared.hr.training in the explicit @EnableJpaRepositories list — @EntityScan is broad so the entities are found either way, but repositories are not, and without this the tables are never created. TrainingSchemaMigration (@Order(43); 42 is the legal one) adds what the entity mapping cannot express. Five UNIQUE indexes are treated as fatal because each is a correctness guarantee nothing else provides: - (course_uid, version_number): two concurrent publishes would otherwise mint the same number and every assignment pinned to "version 3" becomes ambiguous. - one attestation per assignment: the WORM guard blocks UPDATE and DELETE, not a duplicate INSERT. - the notification claim index IS the idempotency of the whole reminder pipeline — the claim is an INSERT against it, so without it a retried sweep re-mails every overdue employee of every tenant. - one recertification per (member, course, due date); one progress row per slide. The course-item CHECK is written as a two-column predicate on purpose: SchemaCleanupRunner @Order(1) drops every single-column IN-list CHECK on every run, because that is the shape Hibernate emits for @Enumerated(STRING). CockroachDB/Yugabyte have no ADD CONSTRAINT IF NOT EXISTS for CHECKs, so "already exists" is caught and treated as success. The test is reflection-only. mvn test in this repo MIGRATES PRODUCTION — DemoApplicationTests is a @SpringBootTest with no test profile and no src/test/resources — so it asserts the SQL constants against each entity's @Table name without starting a context, which is the failure that actually happens: a table rename leaving the hand-written SQL behind.

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