Charles Leung
04/11/2023, 7:27 PMNate
04/11/2023, 11:43 PMprofiles.toml
the active profile when you run prefect server start
?
# set a profile
prefect profile use my-profile
Charles Leung
04/11/2023, 11:50 PMRyan Peden
04/12/2023, 11:59 PMcf1159bd0d3c
was the latest SQLite migration in 2.8.6:
• Migration list
• Revision ID
You can downgrade the database to that revision. Make a backup copy first of the database first; then, this command should make the database compatible with 2.8.6 again:
prefect server database downgrade -r cf1159bd0d3c
Marius Vollmer
04/19/2023, 9:43 AMalembic.util.exc.CommandError: The revision '15f5083c16bd' cannot be found.
Traceback (last call):
File "/usr/local/lib/python3.10/site-packages/alembic/script/base.py", line 240, in _catch_revision_errors
yield
file "/usr/local/lib/python3.10/site-packages/alembic/script/base.py", line 450, in _upgrade_revs
for script in reversed(list(revs))
file "/usr/local/lib/python3.10/site-packages/alembic/script/revision.py", line 797, in iterate_revisions
revisions, heads = fn(
file "/usr/local/lib/python3.10/site-packages/alembic/script/revision.py", line 1452, in _collect_upgrade_revisions
current_revisions = self.get_revisions(lower)
File "/usr/local/lib/python3.10/site-packages/alembic/script/revision.py", line 525, in get_revisions
return sum([self.get_revisions(id_elem) for id_elem in id_], ())
File "/usr/local/lib/python3.10/site-packages/alembic/script/revision.py", line 525, in <listcomp>.
return sum([self.get_revisions(id_elem) for id_elem in id_], ())
File "/usr/local/lib/python3.10/site-packages/alembic/script/revision.py", line 550, in get_revisions
return tuple(
File "/usr/local/lib/python3.10/site-packages/alembic/script/revision.py", line 551, in <genexpr>.
self._revision_for_ident(rev_id, branch_label)
File "/usr/local/lib/python3.10/site-packages/alembic/script/revision.py", line 622, in _revision_for_ident
raise ResolutionError(
alembic.script.revision.ResolutionError: No such revision or branch '15f5083c16bd'.
The above exception was the direct cause of the following exception:
.....
So in this case Postgre instead of SQLite.
Do I have to downgrade the database first and then deploy the "old" version? Would I need to downgrade accordingly as follows?
Prefect Server Database Downgrade -r 4a1a0e4f89de