Unable to upgrade database for 1.2.0

Issue #168 invalid
Former user created an issue

On a throwaway VM I tried upgrading Rhodecode to version 1.2.0beta to test it out. This VM was previously running 1.1.4. I cloned Rhodecode from the main repo, installed it, and made a new production.ini without issue. However, when running "paster upgrade-db production.ini" I got the following: {{{

root@rhodecodeVM:~/rhodecode2# paster upgrade-db production.ini 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 2 performing upgrade step 0 attempting to do database upgrade to version 3 Traceback (most recent call last): File "/usr/local/bin/paster", line 9, in <module> load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')() File "/usr/local/lib/python2.6/dist-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 84, in run invoke(command, command_name, options, args[1:]) File "/usr/local/lib/python2.6/dist-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 123, in invoke exit_code = runner.run(args) File "/usr/local/lib/python2.6/dist-packages/RhodeCode-1.2.0beta-py2.6.egg/rhodecode/lib/utils.py", line 687, in run return super(BasePasterCommand, self).run(args[1:]) File "/usr/local/lib/python2.6/dist-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 218, in run result = self.command() File "/usr/local/lib/python2.6/dist-packages/RhodeCode-1.2.0beta-py2.6.egg/rhodecode/lib/dbmigrate/init.py", line 59, in command dbmanage.upgrade() File "/usr/local/lib/python2.6/dist-packages/RhodeCode-1.2.0beta-py2.6.egg/rhodecode/lib/db_manage.py", line 171, in upgrade callable = getattr(UpgradeSteps(self), 'step_%s' % step)() File "/usr/local/lib/python2.6/dist-packages/RhodeCode-1.2.0beta-py2.6.egg/rhodecode/lib/db_manage.py", line 146, in step_0 api.upgrade(db_uri, repository_path, dbversion) File "/usr/local/lib/python2.6/dist-packages/RhodeCode-1.2.0beta-py2.6.egg/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 "/usr/local/lib/python2.6/dist-packages/RhodeCode-1.2.0beta-py2.6.egg/rhodecode/lib/dbmigrate/migrate/versioning/util/__init__.py", line 159, in with_engine return f(*a, kw) File "/usr/local/lib/python2.6/dist-packages/RhodeCode-1.2.0beta-py2.6.egg/rhodecode/lib/dbmigrate/migrate/versioning/api.py", line 365, in _migrate schema.runchange(ver, change, changeset.step) File "/usr/local/lib/python2.6/dist-packages/RhodeCode-1.2.0beta-py2.6.egg/rhodecode/lib/dbmigrate/migrate/versioning/schema.py", line 84, in runchange change.run(self.engine, step) File "/usr/local/lib/python2.6/dist-packages/RhodeCode-1.2.0beta-py2.6.egg/rhodecode/lib/dbmigrate/migrate/versioning/script/py.py", line 138, in run script_func = self._func(funcname) File "/usr/local/lib/python2.6/dist-packages/RhodeCode-1.2.0beta-py2.6.egg/rhodecode/lib/dbmigrate/migrate/versioning/script/py.py", line 157, in _func if not hasattr(self.module, funcname): File "/usr/local/lib/python2.6/dist-packages/RhodeCode-1.2.0beta-py2.6.egg/rhodecode/lib/dbmigrate/migrate/versioning/script/py.py", line 153, in module self._module = self.verify_module(self.path) File "/usr/local/lib/python2.6/dist-packages/RhodeCode-1.2.0beta-py2.6.egg/rhodecode/lib/dbmigrate/migrate/versioning/script/py.py", line 96, in verify_module module = import_path(path) File "/usr/local/lib/python2.6/dist-packages/RhodeCode-1.2.0beta-py2.6.egg/rhodecode/lib/dbmigrate/migrate/versioning/util/importpath.py", line 12, in import_path module = import(filename) File "/usr/local/lib/python2.6/dist-packages/RhodeCode-1.2.0beta-py2.6.egg/rhodecode/lib/dbmigrate/versions/003_version_1_2_0.py", line 13, in <module> from rhodecode.model.db import BaseModel ImportError: cannot import name BaseModel

}}}

I backed up the DB and just recreated it from scratch and got 1.2.0beta working.

Comments (2)

  1. Marcin Kuzminski repo owner

    it's beta, migration is not finished yet, it'll be finished when all tasks are closed and db models are stable. If you want to use 1.2beta you need to make db from scratch. resolving as invalid

  2. Former user Account Deleted

    No worries--wanted to make sure you knew about it (as you did).

    Liking 1.2.0 so far!

  3. Log in to comment