1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! SQL migrations via [`refinery`].
//!
//! `pgorm` keeps migration definitions in your application crate (or a dedicated migrations crate)
//! and provides small helpers to run them with consistent error handling.
//!
//! # Example (embedded SQL migrations)
//!
//! ```ignore
//! use pgorm::{create_pool, migrate};
//! use std::env;
//!
//! mod embedded {
//! use pgorm::embed_migrations;
//! embed_migrations!("./migrations");
//! }
//!
//! # async fn main_impl() -> pgorm::OrmResult<()> {
//! let pool = create_pool(&env::var("DATABASE_URL")?)?;
//! migrate::run_pool(&pool, embedded::migrations::runner()).await?;
//! Ok(())
//! # }
//! ```
use crateOrmResult;
pub use ;
/// Run migrations on a single PostgreSQL connection.
pub async
/// Acquire a connection from a pool and run migrations on it.
pub async