Question: sh run.sh and sh manage_db.sh upgrade error
0
gravatar for yychangsd
2.2 years ago by
yychangsd30
yychangsd30 wrote:

I added

database_connection= database_connection = postgresql://galaxy:1Galaxy@localhost:5432/galaxy_db

into galaxy.ini

got an error from

$ ./run.sh

Exception: Your database has version '132' but this code expects version '124'. Please backup your database and then migrate the schema by running 'sh manage_db.sh upgrade'.

Then I run

$ sh manage_db.sh upgrade

Traceback (most recent call last):

File "./scripts/manage_db.py", line 31, in <module> invoke_migrate_main()

File "./scripts/manage_db.py", line 28, in invoke_migrate_main main( repository=repo, url=db_url )

File "/home/oasis/data/galaxy/galaxy-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/shell.py", line 207, in main ret = command_func(**kwargs)

File "/home/oasis/data/galaxy/galaxy-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/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 "/home/oasis/data/galaxy/galaxy-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/util/__init__.py", line 159, in with_engine return f(a, *kw)

File "/home/oasis/data/galaxy/galaxy-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/api.py", line 345, in _migrate changeset = schema.changeset(version)

File "/home/oasis/data/galaxy/galaxy-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/schema.py", line 80, in changeset changeset = self.repository.changeset(database, start_ver, version)

File "/home/oasis/data/galaxy/galaxy-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/repository.py", line 225, in changeset changes = [self.version(v).script(database, op) for v in versions]

File "/home/oasis/data/galaxy/galaxy-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/repository.py", line 189, in version return self.versions.version(p, *k)

File "/home/oasis/data/galaxy/galaxy-dist/eggs/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/versioning/version.py", line 140, in version return self.versions[VerNum(vernum)]

KeyError: <vernum(132)&gt;< p="">

Any suggestions?

Thanks~~

ADD COMMENTlink modified 2.2 years ago by Jennifer Hillman Jackson25k • written 2.2 years ago by yychangsd30
2
gravatar for Hotz, Hans-Rudolf
2.2 years ago by
Switzerland
Hotz, Hans-Rudolf1.8k wrote:

Well, your database version ('132') is higher, than the version expected by the code ('124'). So, you need to downgrade:

sh manage_db.sh downgrade --version=124

However, I would first investigate, why your database version is higher? This looks like you are mixing up two galaxy installations?

Hans-Rudolf

ADD COMMENTlink written 2.2 years ago by Hotz, Hans-Rudolf1.8k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 179 users visited in the last hour