inveniosoftware / invenio-rdm-records

DataCite-based data model for InvenioRDM flavour.
https://invenio-rdm-records.readthedocs.io
MIT License
15 stars 81 forks source link

alembic: fix wrongly assigned down revision #1687

Closed zzacharo closed 3 months ago

zzacharo commented 4 months ago

The down_revision should be pointed to 4a15e8671f4d which creates the draft/record metadata/files. The existing value i.e cfcb8cb78708 causes an error to run alembic upgrade Requested revision ff860d48fb4b overlaps with other requested revisions cfcb8cb78708.

zzacharo commented 4 months ago

ping also @max-moser as you were the last one changed the down revision there I think. This creates back 3 branches for invenio-rdm-records when running invenio alembic heads

jrcastro2 commented 4 months ago

Here the stackoverflow answer related to this issue. I would check the alembic_version table to make sure that there is only 1 value (SELECT * FROM alembic_version;) And then run it normally (without any other change). The revision hierarchy of the tasks looks okay to me.

zzacharo commented 3 months ago

Closing this. We investigated with @jrcastro2 that the problem happens with instances that are in v12 beta version. The solution to fix the alembic_version table and run the upgrade is to run DELETE FROM alembic_version WHERE version_num = 'cfcb8cb78708'; as the latter was a head before and it was reassigned to a down revision now, see commit