mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-02 09:11:22 +00:00
fmt
This commit is contained in:
parent
833a25012c
commit
3f3b8e31ca
1 changed files with 4 additions and 3 deletions
|
@ -5,8 +5,8 @@ use std::{
|
||||||
process::{Command, Stdio},
|
process::{Command, Stdio},
|
||||||
};
|
};
|
||||||
|
|
||||||
// It's not possible to call `export_snapshot()` for each dump and run the dumps in parallel with the
|
// It's not possible to call `export_snapshot()` for each dump and run the dumps in parallel with
|
||||||
// `--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 output = Command::new("pg_dump")
|
let output = Command::new("pg_dump")
|
||||||
|
@ -44,7 +44,8 @@ pub fn check_dump_diff(before: String, after: String, label: &str) {
|
||||||
// Remove identical items
|
// Remove identical items
|
||||||
.map(|dump| chunks(dump).collect::<BTreeSet<_>>())
|
.map(|dump| chunks(dump).collect::<BTreeSet<_>>())
|
||||||
.differences()
|
.differences()
|
||||||
// Remove items without unwanted types of differences (if migrations are correct, then this removes everything)
|
// Remove items without unwanted types of differences (if migrations are correct, then this
|
||||||
|
// removes everything)
|
||||||
.map(|chunks| chunks.map(|&i| normalize_chunk(i)).collect::<BTreeSet<_>>());
|
.map(|chunks| chunks.map(|&i| normalize_chunk(i)).collect::<BTreeSet<_>>());
|
||||||
|
|
||||||
let [only_in_before, only_in_after] = normalized_chunk_vecs
|
let [only_in_before, only_in_after] = normalized_chunk_vecs
|
||||||
|
|
Loading…
Reference in a new issue