Skip to content

[management] Migrate events sqlite store to gorm #3837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 20, 2025

Conversation

bcmmbaga
Copy link
Contributor

Describe your changes

Issue ticket number and link

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

@bcmmbaga bcmmbaga changed the title [management] Migrate sqlite store to gorm [management] Migrate events sqlite store to gorm May 17, 2025
@bcmmbaga bcmmbaga marked this pull request as ready for review May 19, 2025 12:15
@Copilot Copilot AI review requested due to automatic review settings May 19, 2025 12:15
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the events SQLite store from raw SQL to using GORM with updated models and migration logic while enhancing test coverage for legacy encrypted data handling.

  • Migrates the event store and associated models to GORM.
  • Replaces SQL migration logic with GORM-based migrations and updates tests accordingly.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
management/server/event.go Updates the event model with GORM annotations and fixes type conversion in event store.
management/server/activity/sqlite/sqlite.go Converts raw SQLite handling to GORM including schema migrations and encrypted field processing.
management/server/activity/sqlite/migration_test.go Updates tests to reflect new migration logic and GORM usage.
management/server/activity/sqlite/migration.go Refactors migration functions to work with GORM, including handling legacy encryption and duplicate records.
go.mod Adjusts dependency ordering by moving the go-sqlite3 module to an indirect dependency.

Copy link

@bcmmbaga bcmmbaga merged commit 4785f23 into main May 20, 2025
35 checks passed
@bcmmbaga bcmmbaga deleted the migrate-sqlite-store-to-gorm branch May 20, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants