Skip to content

Commit

Permalink
Merge pull request #87 from GreenmaskIO/fix/toc_entries_merge_without…
Browse files Browse the repository at this point in the history
…_data_section

fix: Fixed wrong behavior of schema and data toc entries merge
  • Loading branch information
wwoytenko authored Apr 29, 2024
2 parents e2d52dd + a6bd578 commit 6415bd2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/db/postgres/cmd/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,11 @@ func (d *Dump) Run(ctx context.Context) (err error) {
func (d *Dump) MergeTocEntries(schemaEntries []*toc.Entry, dataEntries []*toc.Entry) (
[]*toc.Entry, error,
) {
if len(dataEntries) == 0 {
// No data entries, just return schema entries
return schemaEntries, nil
}

// TODO: Assign dependencies and sort entries in the same order
res := make([]*toc.Entry, 0, len(schemaEntries)+len(dataEntries))

Expand Down

0 comments on commit 6415bd2

Please sign in to comment.