Log-in to mysql, drop the table displayed in the error message, and re-run 
the migrate step. Repeat for each table. This typically happens when 
upgrading after performing a roll-back. Make sure you have a backup handy 
in case this doesn't work :).

mysql -u root -p
Enter password:
>use gitlab_databasename;
>drop table XXXX;
>quit;

re-run command:
sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production

On Wednesday, February 26, 2014 1:13:57 AM UTC-8, Purushothaman M wrote:
>
> Hi,
>
> we upgrading from Gitlab CE 6.5 to 6.6 stable edition, everything went 
> fine until we ran the command for db migration.
>
>  sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
>
> ==  CreateMergeRequestDiffs: migrating 
> ========================================
> -- create_table(:merge_request_diffs)
> rake aborted!
> An error has occurred, all later migrations canceled:
>
> Mysql2::Error: Table 'merge_request_diffs' already exists: CREATE TABLE 
> `merge_request_diffs` (`id` int(11) DEFAULT NULL auto_increment PRIMARY 
> KEY, `state` varchar(255) DEFAULT 'collected' NOT NULL, `st_commits` 
> longtext, `st_diffs` longtext, `merge_request_id` int(11) NOT NULL, 
> `created_at` datetime, `updated_at` datetime) 
> ENGINE=InnoDB/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:287:in
>  
> `query'
>
> this is an live server. pls help.
>
> p.s:  Env info:
>
> System information
> System:         Ubuntu 13.04
> Current User:   git
> Using RVM:      no
> Ruby Version:   1.9.3p392
> Gem Version:    1.8.23
> Bundler Version:1.3.5
> Rake Version:   10.1.1
>
> GitLab information
> Version:        6.6.0
> Revision:       490f99d
> Directory:      /home/git/gitlab
> DB Adapter:     mysql2
> URL:            http://server.abc.com
> HTTP Clone URL: http://server.abc.com/some-project.git
> SSH Clone URL:  [email protected]:some-project.git
> Using LDAP:     yes
> Using Omniauth: no
>
> GitLab Shell
> Version:        1.8.0
> Repositories:   /home/git/repositories/
> Hooks:          /home/git/gitlab-shell/hooks/
> Git:            /usr/bin/git
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to