1. Marcin Kuzminski
  2. RhodeCode
  3. Issues

Issues

Issue #727 resolved

Upgrade fail 1.3.6 to 1.5.1 Ubuntu 12.04.1 LTS

Sridher Jakku
created an issue

Upgrading failing at : paster upgrade-db production.ini

paster upgrade-db production.ini *** WARNING *** Make sure your version of sqlite is at least 3.7.X.
Earlier versions are known to fail on some migrations ***********

You are about to perform database upgrade, make sure You backed up your database before. Continue ? [y/n]y FOUND CURRENT DATABASE UNDER VERSION CONTROL WITH VERSION 5 ********** PERFORMING UPGRADE STEP 0 **** ATTEMPTING TO DO DATABASE UPGRADE TO VERSION 9 ********** /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'RhodeCodeSetting' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.RhodeCodeSetting'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'RhodeCodeUi' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.RhodeCodeUi'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'User' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.User'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'UserEmailMap' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.UserEmailMap'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'UserLog' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.UserLog'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'UsersGroup' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.UsersGroup'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'UsersGroupMember' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.UsersGroupMember'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'Repository' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.Repository'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'RepoGroup' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.RepoGroup'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'Permission' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.Permission'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'UserRepoToPerm' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.UserRepoToPerm'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'UserToPerm' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.UserToPerm'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'UsersGroupRepoToPerm' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.UsersGroupRepoToPerm'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'UsersGroupToPerm' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.UsersGroupToPerm'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'UserRepoGroupToPerm' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.UserRepoGroupToPerm'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'UsersGroupRepoGroupToPerm' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.UsersGroupRepoGroupToPerm'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'Statistics' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.Statistics'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'UserFollowing' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.UserFollowing'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'CacheInvalidation' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.CacheInvalidation'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'ChangesetComment' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.ChangesetComment'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'ChangesetStatus' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.ChangesetStatus'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'PullRequest' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.PullRequest'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'PullRequestReviewers' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.PullRequestReviewers'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'Notification' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.Notification'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'UserNotification' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.UserNotification'> _as_declarative(cls, classname, cls.dict) /var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/ext/declarative.py:1343: SAWarning: The classname 'DbMigrateVersion' is already in the registry of this declarative base, mapped to <class 'rhodecode.model.db.DbMigrateVersion'> _as_declarative(cls, classname, cls.dict) 2013-01-15 16:11:43,775 INFO sqlalchemy.engine.base.Engine CREATE TABLE user_email_map ( email_id INTEGER NOT NULL, user_id INTEGER, email VARCHAR(255), PRIMARY KEY (email_id), UNIQUE (email), UNIQUE (email_id), UNIQUE (email), UNIQUE (email_id), FOREIGN KEY(user_id) REFERENCES users (user_id) )

2013-01-15 16:11:43,776 INFO sqlalchemy.engine.base.Engine () 2013-01-15 16:11:44,173 INFO sqlalchemy.engine.base.Engine COMMIT 2013-01-15 16:11:44,174 INFO sqlalchemy.engine.base.Engine CREATE INDEX uem_email_idx ON user_email_map (email) 2013-01-15 16:11:44,174 INFO sqlalchemy.engine.base.Engine () 2013-01-15 16:11:44,486 INFO sqlalchemy.engine.base.Engine COMMIT 2013-01-15 16:11:44,486 INFO sqlalchemy.engine.base.Engine CREATE INDEX uem_email_idx ON user_email_map (email) 2013-01-15 16:11:44,487 INFO sqlalchemy.engine.base.Engine () 2013-01-15 16:11:44,487 INFO sqlalchemy.engine.base.Engine ROLLBACK Traceback (most recent call last): File "/var/www/rhodecode-venv/bin/paster", line 9, in <module> load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')() File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/paste/script/command.py", line 104, in run invoke(command, command_name, options, args[1:]) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke exit_code = runner.run(args) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/rhodecode/lib/utils.py", line 662, in run return super(BasePasterCommand, self).run(args[1:]) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/paste/script/command.py", line 238, in run result = self.command() File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/rhodecode/lib/dbmigrate/init.py", line 59, in command dbmanage.upgrade() File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/rhodecode/lib/db_manage.py", line 295, in upgrade getattr(UpgradeSteps(self), 'step_%s' % step)() File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/rhodecode/lib/db_manage.py", line 169, in step_0 api.upgrade(db_uri, repository_path, dbversion) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/rhodecode/lib/dbmigrate/migrate/versioning/api.py", line 186, in upgrade return _migrate(url, repository, version, upgrade=True, err=err, opts) File "<string>", line 2, in _migrate File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/rhodecode/lib/dbmigrate/migrate/versioning/util/__init__.py", line 159, in with_engine return f(*a, kw) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/rhodecode/lib/dbmigrate/migrate/versioning/api.py", line 366, in _migrate schema.runchange(ver, change, changeset.step) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/rhodecode/lib/dbmigrate/migrate/versioning/schema.py", line 91, in runchange change.run(self.engine, step) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/rhodecode/lib/dbmigrate/migrate/versioning/script/py.py", line 145, in run script_func(engine) File "/var/www/rhodecode-venv/lib/python2.7/site-packages/rhodecode/lib/dbmigrate/versions/006_version_1_4_0.py", line 30, in upgrade tbl.create() File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/schema.py", line 593, in create checkfirst=checkfirst) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2302, in _run_visitor conn._run_visitor(visitorcallable, element, kwargs) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1972, in _run_visitor kwargs).traverse_single(element) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/sql/visitors.py", line 106, in traverse_single return meth(obj, kw) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/engine/ddl.py", line 90, in visit_table self.traverse_single(index) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/sql/visitors.py", line 106, in traverse_single return meth(obj, kw) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/engine/ddl.py", line 102, in visit_index self.connection.execute(schema.CreateIndex(index)) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1449, in execute params) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1542, in _execute_ddl compiled File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context context) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context context) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 331, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.OperationalError: (OperationalError) index uem_email_idx already exists u'CREATE INDEX uem_email_idx ON user_email_map (email)' ()

Comments (3)

  1. Log in to comment