Migrate database schema management from SQL to Liquibase#9
Conversation
Introduce Liquibase for database schema management. Both changesets use preConditions to safely handle existing production databases: the table creation is skipped if the table already exists, and the seed data insert is skipped if the table is not empty. https://claude.ai/code/session_01Xwj7JnFnQxBjr5YvwbB46R
PR Review: Migrate database schema management from SQL to LiquibaseGood migration overall. Liquibase is the right tool for managing schema evolution in a production app. A few observations: bigint + autoIncrement vs BIGSERIAL Precondition approach Suggestion: Liquibase contexts for seed data Check profile-specific configs Minor Overall: clean migration that correctly delegates schema management to Liquibase, preserves the existing schema and seed data, and uses preconditions for safe bootstrapping against a pre-existing database. |
Spring Boot 4 requires the dedicated starter for Liquibase autoconfiguration to work. Without it, Liquibase doesn't run and the database table is never created. https://claude.ai/code/session_01Xwj7JnFnQxBjr5YvwbB46R
Skeleton App - Development GuidelinesGeneral Code Style
Java Style
TypeScript Style
Testing Style
Angular Style
Design
Project OverviewReference application demonstrating patterns for:
Architecture
Key Technologies
Development CommandsFrontendcd client && npm start # Start dev server
cd client && npm run build # Production buildBackendcd server && mvn spring-boot:run -Dspring-boot.run.profiles=local # Start with local profileTestingscripts/compose_up.sh # Start test stack
cd test && npm test # Run E2E tests
cd test && npx playwright test --ui # Interactive test runnerAPI Routes
Data Model
Configuration PatternsSpring Profiles
Environment Config
|
Summary
This PR migrates the database schema management from Spring's SQL initialization to Liquibase, a dedicated database migration tool. This provides better version control, rollback capabilities, and more robust schema management.
Key Changes
pom.xmlfor database migration managementdb/changelog/db.changelog-master.yaml) with two changesets:greetingstable with proper constraintsschema.sql) that was previously used for initializationapplication.yml:ddl-auto: none)Implementation Details
https://claude.ai/code/session_01Xwj7JnFnQxBjr5YvwbB46R