Component
API Server / GraphQL
Infrahub version
1.8.4
Current Behavior
only attributes with unique=False and read-only=False should be included in the Template schema generated for a given Node schema. but if I update an attribute from unique=True to unique=False, then the attribute is not added to existing Template instances for the Node
Expected Behavior
update the uniqueness of an attribute should correctly update any existing instances of Template schemas for the node to add/remove the attribute as appropriate
Steps to Reproduce
- load a schema that includes a unique attribute and has
generate_template=True
- create an instance of the Template schema for your schema from step 1
- load an updated version of the schema from step 1 that sets the unique attribute to be non-unique
- the attribute should be added to the Template schema and be updateable on the Template instance from step 2, but it is not
Additional Information
the fix requires adding a new attribute.unique.update migration that does something similar to the AttributeSupportsGeneratedSchemaMigration migration
Component
API Server / GraphQL
Infrahub version
1.8.4
Current Behavior
only attributes with unique=False and read-only=False should be included in the Template schema generated for a given Node schema. but if I update an attribute from unique=True to unique=False, then the attribute is not added to existing Template instances for the Node
Expected Behavior
update the uniqueness of an attribute should correctly update any existing instances of Template schemas for the node to add/remove the attribute as appropriate
Steps to Reproduce
generate_template=TrueAdditional Information
the fix requires adding a new
attribute.unique.updatemigration that does something similar to theAttributeSupportsGeneratedSchemaMigrationmigration