Issue upgrading database for local Galaxy

Hello!

I’m trying to start a local instance of Galaxy following these instructions: Get Galaxy - Galaxy Community Hub

I’ve done this successfully with a past release of Galaxy but this most recent release is giving me trouble.

While running sh run.sh, I’m getting the following error:

galaxy.model.migrations.exceptions.OutdatedDatabaseError: Your galaxy database has version 3af58c192752, but this code expects version 312602e3191d. To upgrade your database, run `manage_db.sh upgrade`. For more options (e.g. upgrading/downgrading to a specific version) see instructions in that file. Please remember to backup your database before migrating.

I then ran manage_db.sh upgrade as suggested and reran sh run.sh, but the error persisted. This was the output of running manage_db.sh upgrade:

Unsetting $PYTHONPATH
Activating Conda environment: _galaxy_
Activating virtualenv at .venv
/Users/paigekulzer/Documents/Repos/galaxy/.venv/lib/python3.9/site-packages/pydantic/_internal/_generate_schema.py:2249: UnsupportedFieldAttributeWarning: The 'default' attribute with value None was provided to the `Field()` function, which has no effect in the context it was used. 'default' is field-specific metadata, and can only be attached to a model field using `Annotated` metadata or by assignment. This may have happened because an `Annotated` type alias using the `type` statement was used, or if the `Field()` function was attached to a single member of a union type.
  warnings.warn(
INFO:alembic.runtime.migration:Context impl SQLiteImpl.
INFO:alembic.runtime.migration:Will assume non-transactional DDL.
INFO:alembic.runtime.migration:Running upgrade 3af58c192752 -> c0959ad462b2, Add tool_id and tool_version to tool_landing_request table
INFO:alembic.runtime.migration:Context impl SQLiteImpl.
INFO:alembic.runtime.migration:Will assume non-transactional DDL.

I’ve also tried running manage_db.sh upgrade 312602e3191d to specify the specific database Galaxy’s looking for, but this doesn’t solve the issue. No matter what I’ve tried, I’m stuck with the 3af58c192752 version of the database. Any help getting this database upgraded so that I can run Galaxy locally would be greatly appreciated!

Hi @paige_kulzer

Are you starting up a completely new Galaxy instance? Or are you updating a prior instance?

The Get Galaxy - Galaxy Community Hub instructions are not really intended to work out of the box without other administrative changes. Now, it did work easier about 4 years ago, but by now it is more complex. And, if you are updating, there is a dedicated protocol that is different!

Overall, I wondering if that is really the best option? If you are looking for a simple standalone Galaxy server, the Docker Galaxy would be a much easier choice since this is the intended purpose. It works about the same as the other distributions but has some special configuration options already set, and ways to quickly set basic administrative parameters such as how long to retain data (that you would probably want to toggle) but the rest is exactly the same. This also comes with common tools already installed (and indexes are easily linked in). You can run scripts to load more tools quickly. In short, this version is more like the early versions from “get galaxy” plus a bit more to make it nicer, quicker.

Please let us know what you think! :slight_smile: