Skip to content

Feature/closing compat gap#52

Merged
zacateras merged 14 commits intomainfrom
feature/closing-compat-gap
Apr 10, 2026
Merged

Feature/closing compat gap#52
zacateras merged 14 commits intomainfrom
feature/closing-compat-gap

Conversation

@zacateras
Copy link
Copy Markdown
Member

This pull request expands the schema scripting and comparison capabilities of the project, with a focus on improved compatibility handling, new object types, and more comprehensive scripting rules. Notably, it adds support for scripting SQL CLR objects, standalone table statistics, and enhances normalization and compatibility logic for schema and data comparisons.

Scripting and Discovery Enhancements

  • Added support for discovering and scripting SQL CLR scalar functions, table-valued functions, and stored procedures, now treated as Function and StoredProcedure objects. [1] [2] [3] [4] [5]
  • Schema scripting now emits built-in dbo when it has explicit schema permissions or schema-level extended properties, without emitting CREATE SCHEMA. [1] [2] [3]
  • Standalone user-created table statistics are now scripted as deterministic post-create table statements, with detailed metadata and option support. [1] [2] [3] [4]

Comparison and Normalization Improvements

  • Enhanced normalization rules for status and diff to treat many equivalent script variations as compatible, including whitespace-only lines, role membership syntax, queue options, Service Broker contract/service formatting, message-type validation, extended-property ordering, and TableData row ordering. [1] [2] [3]
  • Legacy and non-canonical schema-less object filenames are now matched to the scripted object name when canonical names require percent escaping, improving compatibility with legacy projects. [1] [2]

Preservation and Reconciliation

  • Improved preservation of reference formatting for banner comments, module identifier quoting, computed-column parentheses, and legacy explicit NULL tokens in CLR table-valued function return columns during compatibility reconciliation.

Other Notable Additions

  • The documentation and specs have been updated to reflect these new scripting, discovery, and normalization rules, including expanded explanations and ordering requirements for statistics and CLR objects. [1] [2] [3] [4] [5] [6] [7] [8]

These changes collectively make the tool more robust, compatible with legacy and canonical formats, and able to script and compare a wider range of SQL Server object types with higher fidelity.

zacateras added 14 commits April 8, 2026 17:17
…ulti-line INSERT statements and update related tests
- Updated SqlChangeTracker to include CLR stored procedures (type 'PC') and table-valued functions (type 'FT') in the introspection and scripting processes.
- Added functionality to script CLR stored procedures and table-valued functions, including their parameters and return types.
- Enhanced the normalization process for CLR table-valued functions to suppress differences related to NULL tokens and formatting.
- Implemented tests to verify the inclusion and correct scripting of CLR objects.
- Updated the SyncCommandService to handle differences in CLR functions and queues more effectively.
@zacateras zacateras marked this pull request as ready for review April 10, 2026 08:25
@zacateras zacateras merged commit d1ce322 into main Apr 10, 2026
4 checks passed
@zacateras zacateras deleted the feature/closing-compat-gap branch April 10, 2026 08:26
@zacateras zacateras linked an issue Apr 10, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve scripting compatibility

1 participant