Because the configuration is shipped off elsewhere, revisions are marked as deployed, and become immutable. Users have to create a new revision (which can be cloned from an existing one) if they want to make changes to a configuration. One revisionrevision per configuration can be marked as 'current'; this allows the users to switch between past revisions at will, or disable the configuration entirely by not picking any revision. The current revision is deployed, when marking a different revision as 'current' you replace the deployed config.
However, any value used for the name
column in the public name table, must be unique across all currentthe 'current' revisions across all current configurations. I'm trying to figure out the best strategy to enforce this.
If this was a plain one-to-many relationship from config to public names, this would be solved by using a unique constraint on the name
column. This is, instead, a manyone-to-many-to-many pattern with revision
acting as the associationbridge table, and the current_revision_id
"collapses" the manyone-to-many-to-many to a virtual one-to-many relationship from config to public names.
In the above output table, the second row represents a "current" revision, made public deployed), and that row has been given exclusive access to the public names in the names
column.
Note that we can’t use namespaces or other additions to the names to make them unique. The names must be unique entirely on their own, once deployed.