Update diff_check.rs

This commit is contained in:
dullbananas 2024-05-23 14:48:15 -07:00 committed by GitHub
parent d57d29392e
commit 56e22b032b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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