Skip to content

Commit 1a53665

Browse files
committed
Update seaorm to 2.0.0-rc.18
1 parent 2d7365d commit 1a53665

File tree

5 files changed

+63
-51
lines changed

5 files changed

+63
-51
lines changed

Cargo.lock

Lines changed: 55 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ hightorrent_api = { git = "https://github.com/angrynode/hightorrent_api" }
4141
log = "0.4.27"
4242
# SQLITE MIGRATIONS (WIP)
4343
migration = { path = "migration" }
44-
sea-orm = { version = "1.1", features = [ "runtime-tokio", "debug-print", "sqlx-sqlite"] }
44+
sea-orm = { version = "2.0.0-rc.18", features = [ "runtime-tokio", "debug-print", "sqlx-sqlite"] }
4545
# Serialization/deserialization, for example in path extractors
4646
serde = { version = "1.0.219", features = ["derive", "rc"] }
4747
# (De)serialization for operations log

migration/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ path = "src/lib.rs"
1212
async-std = { version = "1", features = ["attributes", "tokio1"] }
1313

1414
[dependencies.sea-orm-migration]
15-
version = "1.1.0"
15+
version = "2.0.0-rc.18"
1616
features = [
1717
# Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI.
1818
# View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime.

src/state/error.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ pub enum AppStateError {
2828
},
2929
#[snafu(display("Category error"))]
3030
Category { source: CategoryError },
31+
#[snafu(display("Error during migration"))]
32+
Migration { source: migration::DbErr },
3133
}
3234

3335
impl AppStateError {

src/state/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ impl AppState {
7373
let database = Database::connect(format!("sqlite://{}?mode=rwc", &sqlite_path))
7474
.await
7575
.context(SqliteSnafu)?;
76-
Migrator::up(&database, None).await.unwrap();
76+
77+
Migrator::up(&database, None)
78+
.await
79+
.context(MigrationSnafu)?;
7780

7881
let logger = Logger::new(config.log_path.clone())
7982
.await

0 commit comments

Comments
 (0)