Makis,

you need to run the downgrade command (sh manage_db.sh downgrade --version=129) from the folder with the newer Galaxy. The old one does not have the downgrading scripts.

Thanks for using Galaxy.

Martin

On Tue, Jan 17, 2017 at 7:33 AM Makis Ladoukakis <makis4ever@hotmail.com> wrote:

Hello everyone,


I tried to download a newer version of Galaxy (I had 15.10 and pulled 16.01 in a different directory) and now for some reason in my old working directory I get the error:


Your database has version '133' but this code expects version '129'.


Please backup your database and then migrate the schema by running 'sh manage_db.sh upgrade'.


when I tried:


sh manage_db.sh downgrade --version=129


I got the error:

Traceback (most recent call last):
  File "./scripts/manage_db.py", line 33, in <module>
    invoke_migrate_main()
  File "./scripts/manage_db.py", line 30, in invoke_migrate_main
    main( repository=repo, url=db_url )
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/shell.py", line 209, in main
    ret = command_func(**kwargs)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/api.py", line 202, in downgrade
    return _migrate(url, repository, version, upgrade=False, err=err, **opts)
  File "<string>", line 2, in _migrate
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/util/__init__.py", line 160, in with_engine
    return f(*a, **kw)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/api.py", line 345, in _migrate
    changeset = schema.changeset(version)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/schema.py", line 82, in changeset
    changeset = self.repository.changeset(database, start_ver, version)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/repository.py", line 225, in changeset
    changes = [self.version(v).script(database, op) for v in versions]
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/repository.py", line 189, in version
    return self.versions.version(*p, **k)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/version.py", line 160, in version
    return self.versions[VerNum(vernum)]
KeyError: <VerNum(133)>




I checked earlier posts stating  that i need to remove all .pyc files before downgrading. I did just that but nothing worked.


Any ideas?


Thank you in advance,

Efthymios Ladoukakis




___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/