Databases without any existing migrations will fail when updating to v7.9.7
#5306
Labels
1 - Bug
Incorrect behavior of the product
pri:high
Must be resolved before releasing
regression
This is behavior that once worked that has broken. Must be resolved before the next release.
Milestone
Describe the bug
When attempting to run all of the migrations upon first run, all databases receive this error:
`MySQLdb.OperationalError: (1054, "Unknown column 'collection.CollectionObjectTypeID' in 'field list'")`
This is due to the 0004_intialize_defaults.py migration failing. If you remove new fields that are unexpected, it succeeds, and you can add it back and compose up.
I removed this line from the models file and it succeeded:
specify7/specifyweb/specify/models.py
Line 1370 in 2a0b516
We need to fix incorrect assumptions made by the migration that lead to this update being non-feasible.
To Reproduce
Steps to reproduce the behavior:
.env
file to point to this databasedocker compose up --build
after pulling the latest version ofproduction
Expected behavior
On a brand new Specify 6 database, the migration fails every time. If you remove all migrations, it will fail as well.
MySQLdb.OperationalError: (1054, "Unknown column 'collection.CollectionObjectTypeID' in 'field list'")
Crash Report
Here's a sample database that you can download and import into MariaDB:
geospecify_2024_10_03.sql.zip
It has 3 disciplines and collections, and has never been used in Specify 7.
The text was updated successfully, but these errors were encountered: