We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74ee7ed commit aef5dd6Copy full SHA for aef5dd6
plugins/sql/src/lib.rs
@@ -145,7 +145,9 @@ impl Builder {
145
for db in config.preload {
146
let pool = DbPool::connect(&db, app).await?;
147
148
- if let Some(migrations) = self.migrations.as_mut().unwrap().remove(&db) {
+ if let Some(migrations) =
149
+ self.migrations.as_mut().and_then(|mm| mm.remove(&db))
150
+ {
151
let migrator = Migrator::new(migrations).await?;
152
pool.migrate(&migrator).await?;
153
}
0 commit comments