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
  • Merge requests
  • !8939

Closed
Created Mar 10, 2015 by Administrator@rootOwner
  • Report abuse
Report abuse

Wrong migration order when migrating from 6.x to latest

  • Overview 1
  • Commits 1
  • Changes 1

Created by: ZloeSabo

Im using upgrade guide to upgrade from 6.0 to latest one.

Things went wrong when migrations tried to apply 20140416074002_add_index_on_iid.rb which is removing duplicate issues.

Mysql2::Error: Table 'gitlabhq_production.label_links' doesn't exist: SHOW FULL FIELDS FROM `label_links`/home/soynov/Project/gitlab-development-kit/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.9/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `query'

As I see this problem is because of invalid schema usage: migration uses latest schema for metadata. Current Issue schema includes Issuable concern that specifies label_link relation which should be deleted with corresponded issue. So migration code tries to look up for label_link table.

But there is no such table at that time as it is being created later in 20140729140420_create_label_links.rb

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/ZloeSabo/fix_missing_label_links_table