You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Schema management for the api_log table is now opt-in via api.log.schema.management
(default: NONE). Previously the starter force-installed Flyway and auto-applied the
bundled migration, which broke consumers who:
- already had the table managed elsewhere (Liquibase, manual DDL),
- had a name collision in classpath:db/migration/,
- didn't want Flyway at all.
Changes:
- ApiLogProperties.Schema.Management enum (NONE, FLYWAY) under api.log.schema.management
- ApiLogFlywayConfig: registers a FlywayConfigurationCustomizer when
schema.management=flyway and Flyway is on the classpath; appends
classpath:db/api-log to spring.flyway.locations (additive, doesn't replace).
- pom.xml: flyway-core / flyway-database-postgresql now <optional>true</optional>
- Migration relocated: classpath:db/migration/ → classpath:db/api-log/
- Tests opt in via src/test/resources/application.properties
Docs updated:
- Installation: explains the NONE | FLYWAY choice and the optional Flyway dep
- Quickstart: explicitly sets schema.management=flyway with Flyway dep instructions
- Configuration reference: new property documented
- Schema reference: clarifies "not auto-created by default"
- Changelog: 0.2.0 entry with v0.1.0 migration guide
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
enabled: true # default — set to false to disable the whole infrastructure
92
+
schema:
93
+
management: none # default — see "Schema" below
92
94
```
93
95
94
96
You bring your own:
95
97
96
98
- `DataSource` pointing at a PostgreSQL database
97
99
- `ObjectMapper`bean (Spring Boot's auto-config is fine)
100
+
- Either the `api_log` table created via your own migration tool, OR the bundled Flyway migration (opt in below)
98
101
99
-
The Flyway migration `V1.0__create_api_log.sql` ships with the starter — Spring Boot will pick it up if Flyway is on the classpath.
102
+
### Schema
103
+
104
+
The `api_log` table is **not** created automatically. Two options:
105
+
106
+
1. **Apply the DDL yourself** (default, recommended for production) — see the [Schema reference](https://api-log.devslab.kr/reference/schema/) for the SQL, then put it in your own Flyway/Liquibase/manual flow.
107
+
2. **Opt in to the bundled migration** — add Flyway to your dependencies and set `api.log.schema.management=flyway`. The starter then appends `classpath:db/api-log` to your Flyway locations.
108
+
109
+
Full installation guide: [api-log.devslab.kr/getting-started/installation](https://api-log.devslab.kr/getting-started/installation/).
Copy file name to clipboardExpand all lines: docs/changelog.md
+42-19Lines changed: 42 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,39 +6,62 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
6
6
7
7
## [Unreleased]
8
8
9
+
## [0.2.0] — Schema management opt-in
10
+
11
+
### Changed
12
+
13
+
-**BREAKING: schema management is now opt-in.** v0.1.0 force-installed Flyway and auto-ran the bundled migration. v0.2.0 makes the consumer choose:
14
+
-`api.log.schema.management=none` (default) — apply the DDL yourself (Liquibase, manual `psql`, your own Flyway flow)
15
+
-`api.log.schema.management=flyway` — starter registers a `FlywayConfigurationCustomizer` that adds its location to your Flyway setup
16
+
-`flyway-core` and `flyway-database-postgresql` are now `<optional>true</optional>` — consumers who want `management=flyway` must declare Flyway in their own build.
17
+
- Migration relocated from `classpath:db/migration/V1.0__create_api_log.sql` to `classpath:db/api-log/V1.0__create_api_log.sql` so it no longer collides with the consumer's default Flyway location.
18
+
19
+
### Migration guide (from v0.1.0)
20
+
21
+
If you were depending on v0.1.0's auto-migration:
22
+
23
+
1. Add `org.flywaydb:flyway-core` (and `flyway-database-postgresql` runtime) to your dependencies.
24
+
2. Set `api.log.schema.management=flyway` in your config.
25
+
26
+
If you'd rather apply the schema yourself (recommended for production):
27
+
28
+
1. Copy the SQL from [Schema reference](reference/schema.md) into your migration tool of choice.
29
+
2. Leave `api.log.schema.management` at its default (`none`).
30
+
31
+
## [0.1.0] — Initial release
32
+
33
+
First public release. Repackaged as a standalone Spring Boot starter.
34
+
9
35
### Changed
10
36
11
37
-**Restructured as standalone Spring Boot Starter library.**
0 commit comments