Skip to content

fix(migrations): let the 2.1.0 relationship type backfill run on utf8mb3 and latin1 MySQL databases (backport 2.1 #37189) - #37190

Merged
manerow merged 1 commit into
2.1from
fix/mysql-210-utf8mb3-relationship-type-2.1
Nov 6, 2026
Merged

manerow merged 1 commit into
2.1from
fix/mysql-210-utf8mb3-relationship-type-2.1

Conversation

@manerow

@manerow manerow commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Issue

Cherry-pick of #37189 to 2.1 (no issue).

What it fixes

The 2.1.0 MySQL migration could not finish on a utf8mb3 or latin1 database. One statement in postDataMigrationSQLScript.sql applied COLLATE utf8mb4_bin to entity_relationship.relationType, which takes the database character set, and MySQL rejects a utf8mb4 collation on a utf8mb3 or latin1 column. The statement now converts the column to utf8mb4 first. The comparison stays case-sensitive, so nothing changes on a utf8mb4 database. Full explanation in #37189.

How it was tested

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@manerow manerow added backend safe to test Add this label to run secure Github workflows on PRs labels Nov 5, 2026
@gitar-bot

gitar-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🔴 High risk · The migration converts relation types during a data backfill; an incorrect comparison could mis-match relationships and assign wrong type IDs or JSON.

Fixes the 2.1.0 MySQL migration on utf8mb3 and latin1 databases by converting entity_relationship.relationType to utf8mb4 before applying the utf8mb4_bin collation in postDataMigrationSQLScript.sql. The comparison remains case-sensitive, so utf8mb4 databases are unaffected. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@manerow
manerow merged commit ad4f231 into 2.1 Nov 6, 2026
99 of 100 checks passed
@manerow
manerow deleted the fix/mysql-210-utf8mb3-relationship-type-2.1 branch November 6, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant