Skip to content

Support mariadb 12 and sqlite migrations properly#243

Merged
dkhalife merged 1 commit intomainfrom
back_compat
Mar 15, 2026
Merged

Support mariadb 12 and sqlite migrations properly#243
dkhalife merged 1 commit intomainfrom
back_compat

Conversation

@dkhalife
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 15, 2026 05:27
Copy link
Contributor

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

Updates the API server’s database migrations to better support SQLite and MySQL/MariaDB (incl. MariaDB 12) by using dialect-specific DDL for schema creation and indexes.

Changes:

  • Make the initial schema migration dialect-aware (SQLite vs MySQL/MariaDB) for column types, auto-increment, and index creation syntax.
  • Update the Entra auth migration to create a partial unique index on SQLite and a generated-column-backed unique index on MySQL/MariaDB; add rollback cleanup for the generated columns.

Reviewed changes

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

File Description
apiserver/internal/migrations/001_initial_schema.go Adds dialect branching for initial DDL (types/auto-inc) and avoids unsupported CREATE INDEX IF NOT EXISTS on MySQL.
apiserver/internal/migrations/002_entra_auth.go Changes unique index creation strategy for MySQL/MariaDB (generated columns) and cleans those columns up on Down().

@codecov
Copy link

codecov bot commented Mar 15, 2026

Codecov Report

❌ Patch coverage is 0% with 69 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...piserver/internal/migrations/001_initial_schema.go 0.00% 54 Missing ⚠️
apiserver/internal/migrations/002_entra_auth.go 0.00% 15 Missing ⚠️

📢 Thoughts on this report? Let us know!

@dkhalife dkhalife merged commit 428402e into main Mar 15, 2026
10 of 11 checks passed
@dkhalife dkhalife deleted the back_compat branch March 15, 2026 05:33
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