Topologically sort db-dump.tar.gz
Topologically sort db-dump.tar.gz

Before:

    $ tar tf db-dump.tar.gz
    2021-03-06-140039/
    2021-03-06-140039/README.md
    2021-03-06-140039/schema.sql
    2021-03-06-140039/import.sql
    2021-03-06-140039/export.sql
    2021-03-06-140039/metadata.json
    2021-03-06-140039/data
    2021-03-06-140039/data/teams.csv
    2021-03-06-140039/data/reserved_crate_names.csv
    2021-03-06-140039/data/version_downloads.csv
    2021-03-06-140039/data/keywords.csv
    2021-03-06-140039/data/crates.csv
    2021-03-06-140039/data/dependencies.csv
    2021-03-06-140039/data/version_authors.csv
    2021-03-06-140039/data/users.csv
    2021-03-06-140039/data/crates_keywords.csv
    2021-03-06-140039/data/versions.csv
    2021-03-06-140039/data/categories.csv
    2021-03-06-140039/data/metadata.csv
    2021-03-06-140039/data/badges.csv
    2021-03-06-140039/data/crate_owners.csv
    2021-03-06-140039/data/crates_categories.csv

After:

    $ tar tf db-dump.tar.gz
    2021-03-06-140039
    2021-03-06-140039/export.sql
    2021-03-06-140039/import.sql
    2021-03-06-140039/metadata.json
    2021-03-06-140039/schema.sql
    2021-03-06-140039/README.md
    2021-03-06-140039/data
    2021-03-06-140039/data/metadata.csv
    2021-03-06-140039/data/reserved_crate_names.csv
    2021-03-06-140039/data/categories.csv
    2021-03-06-140039/data/teams.csv
    2021-03-06-140039/data/keywords.csv
    2021-03-06-140039/data/users.csv
    2021-03-06-140039/data/crates.csv
    2021-03-06-140039/data/crates_categories.csv
    2021-03-06-140039/data/badges.csv
    2021-03-06-140039/data/crates_keywords.csv
    2021-03-06-140039/data/crate_owners.csv
    2021-03-06-140039/data/versions.csv
    2021-03-06-140039/data/version_authors.csv
    2021-03-06-140039/data/dependencies.csv
    2021-03-06-140039/data/version_downloads.csv

Notice that e.g. the `dependencies` table, which contains foreign keys
into the `crates` and `versions` tables, used to appear in the tar
BEFORE the `versions` table, which made it impossible to do a streaming
import. Now the files are correctly sorted topologically with all
dependencies appearing in front of the tables which depend on them.

rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io