Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix post-install Script #804

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

schlusslicht
Copy link
Member

@schlusslicht schlusslicht commented Jun 21, 2024

This pull request introduces some minor changes to the post-install.xql, allowing it to run against different Exist-DB versions and setup conditions. This is done by conditionally creating all necessary collections the application needs. Under, e.g., Exist-DB v6.2.0, the collection /db/system/config/db/apps does not exist, initially, whereby the original post-install.xql script fails, as it assumes the existence of the /db/system/config/db/apps collection.

Furthermore, if the application is deployed for the first time (into a fresh Exist-DB instance for example), the collections /db/apps/pessoa/data and /db/apps/pessoa/data/{doc,pub} do not yet exist, wherefore the original post-install.xql script also fails, as it assumes the existence of those collections.

By introducing a conditional and recursive mkcol function and calling it with the full $path of all necessary collections, all different scenarios (e.g., different Exist-DB versions, as well as, arbitrary deployment counts) should be caught and handled correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants