Skip to content

Add arun_migrations, the awaitable form of run_migrations - #29

Merged
jph00 merged 1 commit into
mainfrom
pr/add-arun-migrations-the-awaitable-form-of-run
Sep 2, 2026
Merged

Add arun_migrations, the awaitable form of run_migrations#29
jph00 merged 1 commit into
mainfrom
pr/add-arun-migrations-the-awaitable-form-of-run

Conversation

@jph00

@jph00 jph00 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

arun_migrations(db_path, migrations_dir, verbose=False) runs a custom backend's hooks on the calling event loop, so an async application can await migrations at startup instead of blocking its loop while run_migrations spins up a thread and a private loop for the same work. The SQLite path runs run_migrations in a worker thread. run_migrations is unchanged.

The custom-backend test now runs the migrations through arun_migrations and then checks that run_migrations finds the database up to date. The README and docsrc/custom_backends.qmd mention the new function.

@jph00 jph00 added the enhancement New feature or request label Sep 2, 2026
@jph00
jph00 merged commit a9f011a into main Sep 2, 2026
4 checks passed
@jph00
jph00 deleted the pr/add-arun-migrations-the-awaitable-form-of-run branch September 2, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant