Skip to content

Commit

Permalink
fix: Fixed wrong behavior of schema and data toc entries merge
Browse files Browse the repository at this point in the history
  • Loading branch information
wwoytenko committed Apr 29, 2024
1 parent e2d52dd commit a6bd578
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 a6bd578

Please sign in to comment.