I have a table with hierarchical data.
example schema: id | parent_id | …|some other columns
where parent_id references id of same table.
When I generate log from this table, shown below, Insert staments are generated are not respecting inserting the primary row first before secondary row[parent_id refers primary row id] that depends on it. liquibase --includeObjects="" generateChangeLog --diffTypes data
Since data is huge manually fixing is not viable. Is there a solution from liquibase to address this issue. or any hint that would help is welcome. Thank you.
For anyone having similar issue: For me manually adjusting nodes is no go as there are many records. Hence I took route of XSLT based sorting.
XSLT xml sort candidate
Simple Java program to process xslt against given xml file.
Suggestion: If liquibase can give –includeQuery similar to –includeObjects then it will give us placeholder where we can emphasize on order or records.