paupino / psqlpack

A logical database management system for PostgreSQL enabling incremental database deployment.
Apache License 2.0
8 stars 2 forks source link

Topological sort not putting reference tables before other tables #44

Closed paupino closed 7 years ago

paupino commented 7 years ago

Currently, the complex solution generation is putting reference tables after some other dependent tables. This may be due to an equivalent weight being generated therefore we may need some additional logic surrounding this to cater for this scenario.

paupino commented 7 years ago

An example is with the current complex project. The order of operations at the moment is currently:

data.idents references both country and state, yet they are output after the idents. Other ordering looks ok however indents first is not.

I suspect this is because of equivalent weighting being generated as idents is referenced quite a bit.

paupino commented 7 years ago

Perhaps look at using https://github.com/bluss/petgraph

justinlatimer commented 7 years ago

Fixed by #67