-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Allow anyAttribute in dbchangelog-latest.xsd complex types #7286
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request enhances XML schema extensibility by adding support for arbitrary XML elements and attributes from other namespaces in specific Liquibase change types. The changes make the schema more flexible for future extensions while maintaining backward compatibility.
- Added
<xsd:choice>blocks with<xsd:any>elements to allow arbitrary XML content from other namespaces - Added
<xsd:anyAttribute>declarations to permit additional attributes from external namespaces - Applied these extensibility enhancements consistently across four change types:
dropTable,createSequence,alterSequence, anddropSequence
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...base-standard/src/main/resources/www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| <!-- dropTable --> | ||
| <xsd:element name="dropTable"> | ||
| <xsd:complexType> | ||
| <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> |
Copilot
AI
Sep 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The xsd:any element should be wrapped in a xsd:choice or xsd:sequence container for consistency with the other modified elements and to follow XSD best practices.
| <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> | |
| <xsd:sequence> | |
| <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> | |
| </xsd:sequence> |
| <xsd:element name="createSequence"> | ||
| <xsd:complexType> | ||
| <xsd:choice minOccurs="0" maxOccurs="unbounded"> | ||
| <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> |
Copilot
AI
Sep 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The minOccurs=\"0\" and maxOccurs=\"unbounded\" attributes on the xsd:any element are redundant since the parent xsd:choice already has minOccurs=\"0\" maxOccurs=\"unbounded\". Remove these attributes from the xsd:any element.
…/dbchangelog/dbchangelog-latest.xsd Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
8d6e3cc to
31fb1d7
Compare
This pull request updates the XML schema definition in
dbchangelog-latest.xsdto make several change elements more extensible. The main improvement is allowing additional, non-standard XML elements and attributes within thedropTable,createSequence,alterSequence, anddropSequencechange types, which increases flexibility for future extensions or integrations.Schema extensibility enhancements:
<xsd:choice>block with<xsd:any>to each of the following elements:dropTable,createSequence,alterSequence, anddropSequence, allowing arbitrary XML elements from other namespaces to be included. [1] [2]<xsd:anyAttribute>to each of these elements, permitting additional attributes from other namespaces. [1] [2]Impact
Description
Added support for
anyAttributeindbchangelog-latest.xsdcomplex types to improve flexibility and extensibility when working with XML schemas.This change allows users to define additional attributes seamlessly while maintaining XML schema compliance.
Things to be aware of
None.
Things to worry about
None.
Additional Context
None.