From 56e22b032b318e8e9d157e8da4d6043f0addf827 Mon Sep 17 00:00:00 2001 From: dullbananas Date: Thu, 23 May 2024 14:48:15 -0700 Subject: [PATCH] Update diff_check.rs --- crates/db_schema/src/schema_setup/diff_check.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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");