From cf6e3d6fefd219c6f5ed630050e5a6e6696b4c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Pi=C3=B3rowski?= Date: Wed, 19 Jul 2023 23:41:29 +0200 Subject: [PATCH] Update README.md (#283) add deadpool example --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index f38a4c08..a72ac512 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,14 @@ pushd migrations popd ``` +### Example: Deadpool + +```rust +let mut conn = pool.get().await?; +let client = conn.deref_mut().deref_mut(); +let report = embedded::migrations::runner().run_async(client).await?; +``` + ### Non-contiguous VS Contiguous migrations Depending on how your project/team has been structured will define whether you want to use contiguous (adjacent) migrations `V{1}__{2}.[sql|rs]` or non-contiguous (not adjacent) migrations `U{1}__{2}.[sql|rs]`.