frc5183 / Oatmeal

MIT License
2 stars 0 forks source link

feat/fix(root): fix db schema change, introduce ORM versioning #19

Closed Trip-kun closed 9 months ago

Trip-kun commented 9 months ago

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

coderabbitai[bot] commented 9 months ago

Walkthrough

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.

Changes

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!


Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - If you reply to a *review comment* from CodeRabbit, the bot will automatically respond. - To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment - Note: Review comments are made on code diffs or files, not on the PR overview. - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Note: For conversation with the bot, please use the review comments on code diffs or files. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - The JSON schema for the configuration file is available [here](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json`
Trip-kun commented 9 months ago

@coderabbitai review