Hi, in my projects I tend to create a predefined structure of roles and access groups, plus other things that involves writing in system tables.
Dealing with inserts is not a problem, just put them in the 30.create-table
scripts and the job is done.
Things get harder when I change some predefined CUBA entities, like the Administrators and Anonymous roles, because in that case I have to either delete first and then insert the new records in the tables (with the added complexity on dealing with FKs) or UPDATE them with WHERE clauses on other fields other than the UUID (that can change from one deploy to another).
But if I could opt-out from executing the 30-create-table
scripts of the core CUBA modules (and other add-ons too) except my very own (application) script, I could simply generate a SQL data dump of the entire DB after the first full execution, put this dump in MY 30-create-table
script, and then deactivate the other (upper) 30
create scripts…
Is it something that can be achieved with the current framework version (maybe something undocumented, but accessible from code) ?
Thx, P.