moqui / moqui-framework

Use Moqui Framework to build enterprise applications based on Java. It includes tools for databases (relational, graph, document), local and web services, web and other UI with screens and forms, security, file/resource access, scripts, templates, l10n, caching, logging, search, rules, workflow, multi-instance, and integration.
http://www.moqui.org
Other
279 stars 200 forks source link

Add check-empty-type support to explicit load calls. #584

Open eigood opened 1 year ago

eigood commented 1 year ago

If "load" is requested from the moqui cli, then all given data load types are always run. However, if moqui is started normally, it has special support to load certain data items only the first time, when the database is empty(checked via looking for Enumeration records).

This feature lets one specify check-empty-types, and load types. Then, always call "load" in the deployment process, and the first time through(empty database) it'll load seed,seed-initial, etc, and subsequent calls will just load seed.

acetousk commented 1 year ago

I'm not sure what the objective or use case of this change is. Do you mind explaining that?

It seems like you are adding another way to specify types of data to load conditionally if the database is not loaded (through an enumeration) unless they are specified in the load parameter (where they will always load) in a command line setting.

jonesde commented 1 year ago

There is a recently added feature to load data on start, separate from the empty db load, which sounds similar to what you describe.

Here is the commit:

https://github.com/moqui/moqui-framework/commit/9bd047b797a8136f02461997fe3789aac2ba6679