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
  • #9625

Closed
Open
Created Sep 14, 2015 by Administrator@rootOwner

Database issue after upgrade/migratiion

Created by: UnicronBE

Situation: Migrating and upgrading a GitLab installation. Original installation is 6.9.2, installed from source. New installation is the latest Omnibus edtition installed from your repo's (7.14.3). The old installation used MySQL backend, so conversion to PostgreSQL also had to take place.

Steps taken: Backup of the original setup. On a testing server, setup a new 6.9.2 installation, imported the backup and upgraded to 7.14.3 via source. All is working at this point, but PostgreSQL migration has not yet been performed. Take backup from 7.14.3 test installation. Restored backup on the 7.14.3 installation on the destination server. Converted MySQL database to PostgreSQL (https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/mysql_to_postgresql.md) and restored. Restore shows no errors, all repo's are created as expected.

Issue: After restoring the backup as described above and running the rake check command, I receive the following error:

All migrations up? ... no
Try fixing it:
sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
Please fix the error above and rerun the checks.

However, when I run "gitlab-rake db:migrate" I receive (link to full log underneath):

== 20140125162722 AddAvatarToProjects: migrating ==============================
-- add_column(:projects, :avatar, :string)
-> 0.1571s
== 20140125162722 AddAvatarToProjects: migrated (0.1576s) =====================

== 20140611135229 AddPositionToMergeRequest: migrating ========================
-- add_column(:merge_requests, :position, :integer, {:default=>0})
-> 0.0896s
== 20140611135229 AddPositionToMergeRequest: migrated (0.0900s) ===============

== 20140625115202 CreateUsersStarProjects: migrating ==========================
-- create_table(:users_star_projects)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

http://pastebin.com/3ePVQtzV

Any help or advice very much appreciated!

Regards,

Timothy

Assignee
Assign to
Time tracking