Home / Companies / GitLab / Blog / Post Details
Content Deep Dive

GitLab got bit: MySQL fails at Rails migrations that work in PostgreSQL

Blog post from GitLab

Post Details
Company
Date Published
Author
Job van der Voort
Word Count
254
Company Posts That Month
6
Language
English
Hacker News Points
-
Post removed?
No
Summary

A day after the release of GitLab 7.6, a patch was necessary due to an oversight in database migration affecting MySQL but not PostgreSQL. The issue arose when attempting to remove two columns, extern_uid and provider, from the users table, which had a composite index ensuring uniqueness. While PostgreSQL handled the migration smoothly, MySQL encountered a problem as it rebuilt the index using only the provider column, leading to duplicate indices. The solution involved checking for and removing the index if it existed before proceeding with the column removal. Despite having a comprehensive test suite and QA testing, this simple oversight was missed, prompting a swift patch release. This experience highlighted the need for careful consideration of database-specific behaviors in future migrations.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.