Skip to content

Commit

Permalink
fix: run database migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Jun 22, 2023
1 parent f041c09 commit 31afbe3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/cli/src/cmd/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ use super::get_database_connection;
pub async fn execute_diff() -> Result<(), Error> {
let (_, filename, content, _) = verify_if_config_file_is_present()?;

migration::run().await;

let db: DatabaseConnection = get_database_connection().await?;
let current_dir = std::env::current_dir()?;
let path = format!("{}/{}", current_dir.display(), filename);
Expand Down
3 changes: 3 additions & 0 deletions crates/cli/src/cmd/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ use sea_orm::DatabaseConnection;

pub async fn execute_history() -> Result<(), Error> {
let (_, filename, _, _) = verify_if_config_file_is_present()?;

migration::run().await;

let db: DatabaseConnection = get_database_connection().await?;

let current_dir = std::env::current_dir()?;
Expand Down

0 comments on commit 31afbe3

Please sign in to comment.