- Added SQL migrations for movies and reviews tables. - Implemented SqliteMovieRepository with methods for upserting movies, saving reviews, and querying diary entries. - Introduced models for database rows and conversion to domain models. - Integrated async migration handling in the repository. - Updated Cargo.toml files to include necessary dependencies for async operations and HTTP handling.
10 lines
269 B
Rust
10 lines
269 B
Rust
use domain::errors::DomainError;
|
|
use sqlx::SqlitePool;
|
|
|
|
pub(crate) async fn run(pool: &SqlitePool) -> Result<(), DomainError> {
|
|
sqlx::migrate!("./migrations")
|
|
.run(pool)
|
|
.await
|
|
.map_err(|e| DomainError::InfrastructureError(e.to_string()))
|
|
}
|