Not all database migrations are reversible. When using Alembic + SQLAlchemy, is there a (canonical) way to "tag" my downgrade / migration function so that it cannot be undone?
downgrade
Compare ActiveRecord migrations, where you can raise ActiveRecord::IrreversibleMigration with the down method to signal this.
ActiveRecord::IrreversibleMigration
down
Did an exception (any exception) donwgrade in donwgrade to lower the failure rate "cleanly"?
donwgrade
The exception is enough. This will not lead to migration, and you can never return.
def downgrade(): raise Exception("Irreversible migration")
Source: https://habr.com/ru/post/1211885/More articles:CUDA Profiler: calculate memory and calculate usage - c ++How to implement Pinch Zoom in Picasso library? - javaCamera for Android: fixed focus focus - androidUser element of active message type - phpDeveloping error using // area in Android Studio - android-studioAssigning multiple variables in Haskell - haskellhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1211887/how-does-git-determine-what-objects-need-to-be-sent-between-repositories&usg=ALkJrhioniwva89OLTYCrrZ5IKhTkohh9AInteractive Animated TabBarController - iosIs android: showAsAction not recommended? - javaSelect only one DataFrame multi-index index - pythonAll Articles