1. Marcin Kuzminski
  2. RhodeCode
  3. Issues

Issues

Issue #360 resolved

update-db from 1.2.5-1.3.0

riverajo
created an issue

While trying to upgrade my database from 1.2.5 to 1.3.0. i encountered a issue. I got an exception During the database upgrade "relation "user_repo_group_to_perm" does not exist". After looking at the database I saw a table "users_group_repo_to_perm"(users_ is plural). Not sure if that's the issue or not, but just what I saw after a little digging. I am currently running with postgres 9.1.

Full traceback:

Traceback (most recent call last): File "/usr/bin/paster", line 9, in <module> load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')() File "/usr/lib64/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 104, in run invoke(command, command_name, options, args[1:]) File "/usr/lib64/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 143, in invoke exit_code = runner.run(args) File "/usr/lib64/python2.7/site-packages/RhodeCode-1.3.0beta-py2.7.egg/rhodecode/lib/utils.py", line 614, in run return super(BasePasterCommand, self).run(args[1:]) File "/usr/lib64/python2.7/site-packages/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 238, in run result = self.command() File "/usr/lib64/python2.7/site-packages/RhodeCode-1.3.0beta-py2.7.egg/rhodecode/lib/dbmigrate/init.py", line 59, in command dbmanage.upgrade() File "/usr/lib64/python2.7/site-packages/RhodeCode-1.3.0beta-py2.7.egg/rhodecode/lib/db_manage.py", line 183, in upgrade getattr(UpgradeSteps(self), 'step_%s' % step)() File "/usr/lib64/python2.7/site-packages/RhodeCode-1.3.0beta-py2.7.egg/rhodecode/lib/db_manage.py", line 176, in step_4 self.klass.fixup_groups() File "/usr/lib64/python2.7/site-packages/RhodeCode-1.3.0beta-py2.7.egg/rhodecode/lib/db_manage.py", line 363, in fixup_groups .filter(UserRepoGroupToPerm.user == def_usr)\ File "/usr/lib64/python2.7/site-packages/SQLAlchemy-0.7.4-py2.7-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2045, in scalar ret = self.one() File "/usr/lib64/python2.7/site-packages/SQLAlchemy-0.7.4-py2.7-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2014, in one ret = list(self) File "/usr/lib64/python2.7/site-packages/RhodeCode-1.3.0beta-py2.7.egg/rhodecode/lib/caching_query.py", line 82, in iter return Query.iter(self) File "/usr/lib64/python2.7/site-packages/SQLAlchemy-0.7.4-py2.7-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2057, in iter return self._execute_and_instances(context) File "/usr/lib64/python2.7/site-packages/SQLAlchemy-0.7.4-py2.7-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2072, in _execute_and_instances result = conn.execute(querycontext.statement, self._params) File "/usr/lib64/python2.7/site-packages/SQLAlchemy-0.7.4-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1405, in execute params) File "/usr/lib64/python2.7/site-packages/SQLAlchemy-0.7.4-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1538, in _execute_clauseelement compiled_sql, distilled_params File "/usr/lib64/python2.7/site-packages/SQLAlchemy-0.7.4-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1646, in _execute_context context) File "/usr/lib64/python2.7/site-packages/SQLAlchemy-0.7.4-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1639, in _execute_context context) File "/usr/lib64/python2.7/site-packages/SQLAlchemy-0.7.4-py2.7-linux-x86_64.egg/sqlalchemy/engine/default.py", line 330, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.ProgrammingError: (ProgrammingError) relation "user_repo_group_to_perm" does not exist LINE 2: FROM user_repo_group_to_perm

Attached a database backup as well

Comments (3)

  1. Log in to comment