Repository navigation
Commit eb0e4c3
authored
refactor: consolidate Liquibase migrations into a single changeset per database (#50)
## Summary
- Collapse okapi's incremental Liquibase changelogs into one
`001__create_okapi_outbox_table.sql` per database — PostgreSQL 4
changesets → 1, MySQL 3 → 1. Each `changelog.xml` now includes only the
consolidated file; the per-step migration files are removed.
- Net schema for a **new** installation is unchanged (same table,
columns, both indexes); new users get the full schema from a single
changeset instead of replaying the change history.
- CHANGELOG documents the consolidation and that the `outbox:001`
checksum changes — existing installations must start on a fresh okapi
schema, or clear okapi's rows from `okapi_databasechangelog`, before
upgrading.
## Test Plan
- [x] `LiquibaseE2ETest` (PostgreSQL + MySQL Spring Boot autoconfig,
real Liquibase on Testcontainers) — 8/8 passing
- [x] Concurrency claim/purge integration tests (exercise the
consolidated schema + indexes via real INSERT/claim) — 4/4 passing
- [x] Full `./gradlew ktlintCheck` clean1 parent d9aa3be commit eb0e4c3
10 files changed
Lines changed: 17 additions & 31 deletions
File tree
- okapi-mysql/src/main/resources/com/softwaremill/okapi/db/mysql
- okapi-postgres/src/main/resources/com/softwaremill/okapi/db/postgres
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 6 | + | |
9 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 6 | + | |
10 | 7 | | |
0 commit comments