Fetching Delta Deployment Stage Depency Ordering

Greetings, I am very familiar with SSDT projects but very new to Liquibase Deployments. Thanks for your patience. I have a project structure where each object is contained in a file under a folder relating to it’s object type. I had to move views out of the folder structure that was used for the Fetching Delta stage and into the /post folder structure as a Liquibase “authored” object with headers. During the Fetching Delta phase I could not find a way to have a Liquibase Delta process place a view referenced by a function in front of the function. In other words the pipeline continued to fail with data.viewwName does not exist. It existed at the target, however, this dependency was done prior to apply. Is there a work around for this or a setting that I could use to make this work and keep the object grouped repository structure? The solution that allowed the pipeline to pass was to place alll functions in the /post folder, however, I would like to keep all schema objects organizede together in the project.

This works

When functions are clustered together the way I would like under the objects//functions, I get the error below, even though the changelog has view prior to functions.

Using this changelog ordering and having functions in the scripts/objects/data/functions di not properly resolve at the phase above :

<includeAll path="../scripts/objects/data/tables" relativeToChangelogFile="true"/>

<includeAll path="../scripts/objects/data/views" relativeToChangelogFile="true"/>

<includeAll path="../scripts/objects/data/functions" relativeToChangelogFile="true"/>

<includeAll path="../scripts/objects/data/trigger functions" relativeToChangelogFile="true"/>

<includeAll path="../scripts/objects/data/triggers" relativeToChangelogFile="true"/>

<includeAll path="../scripts/objects/data/constraints" relativeToChangelogFile="true"/>

includeAll only guarantees alphabetical file order within each directory; it does not infer object dependencies. If the delta generator reorders changesets, your original changelog order may not be preserved. Keep the grouped layout and make the dependency explicit: give the view changeset a stable id and set the function changeset to runOrder=“after:view-id” (or give the view runOrder=“first”), then check that the generated delta changelog retains it. If runOrder is unavailable in your version, use an explicit include for the view before the functions includeAll. A precondition/check for the view can also make the failure clearer.