In a scenario where the postgresql/postgis data model has functions and triggers, then is also likely that the tables must be updated following a specific order. This also means that this #145 (comment) should be fixed first, as dbsync fails if a table has a trigger.