Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #9084

Closed
Open
Created Apr 02, 2015 by Administrator@rootOwner

6.x or to 7.9 migration error (Mysql2::Error: Incorrect string value)

Created by: jmaslibre

I was migrating from GitLab v 6.1.0 to v 7.9.1 (7-9-stable branch) (using mysql), following:

https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/6.x-or-7.x-to-7.9.md

Short story: The new merge_request_diffs table is created with charset latin1 in Mysql.

Details: In the step:

# Run database migrations
sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production

I get the error message:

Mysql2::Error: Incorrect string value: '\xCE\xBC","m...' for column 'st_diffs' at row 39

Looking for a solution, I found: https://github.com/gitlabhq/gitlabhq/issues/6407

I had the same problem: the new merge_request_diffs table was created with charset latin1

I executed the command proposed by @ajbw :

alter table merge_request_diffs default character set = utf8 collate = utf8_unicode_ci;
alter table merge_request_diffs convert to character set utf8 collate utf8_unicode_ci;

and then I was able to finish the upgrade.

Thanks for your hard work on GitLab.

Assignee
Assign to
Time tracking