fix: usage of migrate::run now takes two parameters

This commit is contained in:
Ryan Leckey
2020-11-12 07:38:54 -08:00
parent 1ed75ba5f0
commit 12da5ba534
3 changed files with 19 additions and 7 deletions

View File

@@ -33,12 +33,12 @@ pub async fn drop(uri: &str, confirm: bool) -> anyhow::Result<()> {
Ok(())
}
pub async fn reset(uri: &str, confirm: bool) -> anyhow::Result<()> {
pub async fn reset(migration_source: &str, uri: &str, confirm: bool) -> anyhow::Result<()> {
drop(uri, confirm).await?;
setup(uri).await
setup(migration_source, uri).await
}
pub async fn setup(uri: &str) -> anyhow::Result<()> {
pub async fn setup(migration_source: &str, uri: &str) -> anyhow::Result<()> {
create(uri).await?;
migrate::run(uri).await
migrate::run(migration_source, uri).await
}