mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-13 22:22:10 +00:00
Update diff_check.rs
This commit is contained in:
parent
d57d29392e
commit
56e22b032b
|
@ -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");
|
||||||
|
|
Loading…
Reference in a new issue