Hello!
For a long time in my Spring Boot project, I relied on
hibernate.ddl-auto = update
It was simple.
Change an entity → restart the app → the database updates itself.
But when the project grew to 18 entities, I realized something important:
I had zero control over my database history.
So I decided to switch to Liquibase.
What I Changed
- Disabled Hibernate auto schema updates
spring:
jpa:
hibernate:
ddl-auto: none
From that moment, Hibernate stopped modifying the database structure.
2. Enabled Liquibase
spring:
liquibase:
enabled: true
change-log: classpath:db/changelog/changelog.xml
3. Added simple changeSets
<changeSet id="1-create-users" author="Marcin Parśniak">
<createTable tableName="users">
<column name="id" type="BIGINT" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="username" type="VARCHAR(255)">
<constraints nullable="false" unique="true"/>
</column>
<column name="password" type="VARCHAR(255)">
<constraints nullable="false"/>
</column>
<column name="email" type="VARCHAR(255)">
<constraints nullable="false" unique="true"/>
</column>
<column name="created_at" type="TIMESTAMP"/>
<column name="profile_image_path" type="VARCHAR(500)"/>
</createTable>
</changeSet>
Now Liquibase manages the schema.
If you want to see how im doing it, check out my github profile:
M4rc1nek
/
finovara-backend
Backend service for a personal finance management application
💰 Finovara — Backend
Backend REST API for a personal finance management application built with Java 25 and Spring Boot 4.
📖 About the Project
Finovara is a personal finance platform designed to help users take full control of their money. The backend exposes a secure REST API that powers tracking of income and expenses, budget management, savings goals, and financial reporting — all wrapped in a bank-grade security model based on JWT authentication.
The application is designed with scalability in mind and is fully containerized via Docker, with separate production and test database environments managed through Docker Compose.
🎯 Key Features
- 🔐 Authentication & Authorization — JWT-based stateless security with Spring Security; access and refresh token flow with device/user-agent detection
- 💸 Income & Expense Tracking — full CRUD for financial operations with category tagging
- 📊 Statistics & Reports — aggregated financial summaries, spending trends, and exportable PDF reports
- 🏦…
Top comments (0)