This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git


The following commit(s) were added to refs/heads/main by this push:
     new e835138  Document how to safely downgrade from a migration in a PR
e835138 is described below

commit e83513851e9d9a847f2e652c24f495663533939f
Author: Sean B. Palmer <[email protected]>
AuthorDate: Tue Jan 13 15:52:14 2026 +0000

    Document how to safely downgrade from a migration in a PR
---
 atr/docs/database.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/atr/docs/database.md b/atr/docs/database.md
index a4fc288..47d1459 100644
--- a/atr/docs/database.md
+++ b/atr/docs/database.md
@@ -76,3 +76,5 @@ uv run --frozen alembic revision -m "Description of changes" 
--autogenerate
 Obviously, change `"Description of changes"` to an actual description of the 
changes that you made. Keep it short, around 50-60 characters. Then when you 
restart the server you should find that the migration is automatically applied. 
You should be careful, however, before restarting the server. Not all 
migrations apply successfully when autogenerated. Always review the 
automatically produced migrations in `migrations/versions` first, and ensure 
that they are correct before proceeding. On [...]
 
 It can be helpful to make a backup of the entire SQLite database before 
performing the migration, especially if the migration is particularly complex. 
This can help if, for example, the downgrade is broken, otherwise you may find 
yourself in a state from which there is no easy recovery. _Always_ ensure that 
migrations are working locally before pushing them to GitHub, because we apply 
changes from GitHub directly to our deployed containers. Note that sometimes 
the deployed containers con [...]
+
+If testing a migration in a PR, be sure to stop the server and run `uv run 
--frozen alembic downgrade -1` before switching back to any branch not 
containing the migration.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to