Add database::DbConn type

This commit is contained in:
2026-06-27 17:07:42 -04:00
parent 554ae23175
commit 0b7e25c792

View File

@@ -9,6 +9,7 @@ use crate::util::error::{Contextualize, Error, ErrorType};
pub const DB_MIGRATIONS: EmbeddedMigrations = embed_migrations!(); pub const DB_MIGRATIONS: EmbeddedMigrations = embed_migrations!();
pub type DbPool = Pool<AsyncPgConnection>; pub type DbPool = Pool<AsyncPgConnection>;
pub type DbConn = AsyncPgConnection;
/// Connect to the database using the given URI, and perform migrations /// Connect to the database using the given URI, and perform migrations
pub async fn setup<S: Into<String>>(database_uri: S) -> Result<DbPool, Error> { pub async fn setup<S: Into<String>>(database_uri: S) -> Result<DbPool, Error> {