mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-27 06:41:18 +00:00
Update diff_check.rs
This commit is contained in:
parent
d57d29392e
commit
56e22b032b
1 changed files with 3 additions and 1 deletions
|
@ -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