diff --git a/crates/db_schema/src/schema_setup/diff_check.rs b/crates/db_schema/src/schema_setup/diff_check.rs index a14d745e1..cb26bd6bc 100644 --- a/crates/db_schema/src/schema_setup/diff_check.rs +++ b/crates/db_schema/src/schema_setup/diff_check.rs @@ -9,8 +9,11 @@ use std::{ // the `--snapshot` flag. Don't waste your time!!!! pub fn get_dump() -> String { + let db_url = SETTINGS.get_database_url(); let output = Command::new("pg_dump") .args([ + "--dbname", + &db_url, "--schema-only", "--no-owner", "--no-privileges", @@ -21,7 +24,6 @@ pub fn get_dump() -> String { "--no-table-access-method", "--no-tablespaces", ]) - .env("PGDATABASE", SETTINGS.get_database_url()) .stderr(Stdio::inherit()) .output() .expect("failed to start pg_dump process");