You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have multiple integration tests that run and each of them attempts to run the migration. It all works except when I get the error VersionMismatch(20230623210040). Once I get this error any subsequent migration attempts hang.
It appears that I should not be running a migration from each test but running only once if it has not been done yet. How do I detect if it has happened already?
let migrate_result = migrate!("./migrations").run(&conn).await;
match migrate_result {
Ok(()) => {
info!("migration complete");
},
Err(e) => error!("failed to migrate {}", e)
};
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have multiple integration tests that run and each of them attempts to run the migration. It all works except when I get the error VersionMismatch(20230623210040). Once I get this error any subsequent migration attempts hang.
It appears that I should not be running a migration from each test but running only once if it has not been done yet. How do I detect if it has happened already?
Beta Was this translation helpful? Give feedback.
All reactions