Closed Trip-kun closed 9 months ago
The recent updates introduce a versioning system for the ORM within the Oatmeal project, allowing for structured and trackable database schema upgrades. The DatabaseUtil
class has been renamed to ORMLiteDatabaseUtil
and now includes a version constant, upgrade logic, and a method to fetch the current version. The Config
class has been updated to include a version field, and various parts of the codebase have been adjusted to use the new ORMLiteDatabaseUtil
class.
File Path | Change Summary |
---|---|
ORM_UPGRADES.md | Introduced ORM versioning system for tracking changes and upgrades. |
.../oatmeal/Config.java | Added version field with initial value of 1. |
.../oatmeal/util/DatabaseUtil.java | Renamed to ORMLiteDatabaseUtil , added versioning and upgrade methods. |
.../oatmeal/Main.java | Updated to use ORMLiteDatabaseUtil . |
.../oatmeal/managers/MariaManager.java | Replaced DatabaseUtil with ORMLiteDatabaseUtil for data entity operations. |
π In the code where data streams flow,
π A versioned dance, in autumn's glow.
With each commit, the schema aligns,
π On this day in history, our code refines!
@coderabbitai review
Introduces ORM Versioning, starting with 1 Before this release 1-> BOOTSTRAP is this release, it starts the system at version 1 and immediately upgrades it to 2. In the future, this bootstrap will not be needed.
Summary by CodeRabbit
New Features
version
variable in the configuration to align with the database versioning system.Enhancements
upgrade()
method to handle database schema upgrades, ensuring smooth transitions between versions.ORMLiteDatabaseUtil
for database operations, replacing the previousDatabaseUtil
.Refactor
DatabaseUtil
toORMLiteDatabaseUtil
to better reflect its purpose and functionality.Documentation
Bug Fixes
ORMLiteDatabaseUtil
class, maintaining consistency across the codebase.