Skip to content
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

v5.16.0 #260

Merged
merged 2 commits into from
Oct 2, 2024
Merged

v5.16.0 #260

merged 2 commits into from
Oct 2, 2024

Conversation

chullybun
Copy link
Collaborator

  • Enhancement: Database code-generation defaults to the use of JSON-serialized parameters versus UDT/TVP to minimize the need for additional database objects; specifically User-Defined Types (UDT).
    • A new CollectionType property has been added to the code-generation configuration for query-based collection passing; supports JSON (default) and UDT (previous) values. Note that for JSON passing a NVARCHAR(MAX) type should be used.
    • A merge for a sub-collection would previously require a UDT to be created; this is now handled using JSON serialization, unless explicitly required (example YAML udt: true, tvp: WorkHistory).
  • Enhancement: The out-of-the-box Beef Type schema objects (udtBigIntList.sql, udtDateTimeList.sql, udtIntList.sql, udtNVarCharList.sql and udtUniqueIdentifierList.sql) have been removed and will not be automatically included. Where required, these should be manually added to the database project and managed accordingly; use this create-beef-user-defined-types.sql migration script to add.
  • Enhancement: All code-generated SQL objects have been updated to support replacement, for example CREATE OR ALTER versus previous CREATE; this potentially minimizes the need to drop and recreate each migration. This DbEx behavior is predicated on not having any Type (UDT) schema objects which do not support replacement. It is also therefore recommended that all non-generated schema objects support replacement as they all have to adhere to this pattern to avoid unncessary dropping.

- *Enhancement:* Database code-generation defaults to the use of [JSON](https://learn.microsoft.com/en-us/sql/relational-databases/json/json-data-sql-server)-serialized parameters versus UDT/TVP to minimize the need for additional database objects; specifically [User-Defined Types](https://learn.microsoft.com/en-us/sql/t-sql/statements/create-type-transact-sql) (UDT).
  - A new `CollectionType` property has been added to the code-generation configuration for query-based collection passing; supports `JSON` (default) and `UDT` (previous) values. Note that for JSON passing a `NVARCHAR(MAX)` type should be used.
  - A merge for a sub-collection would previously require a `UDT` to be created; this is now handled using JSON serialization, unless explicitly required (example YAML `udt: true, tvp: WorkHistory`).
- *Enhancement:* The out-of-the-box _Beef_ `Type` schema objects (`udtBigIntList.sql`, `udtDateTimeList.sql`, `udtIntList.sql`, `udtNVarCharList.sql` and `udtUniqueIdentifierList.sql`) have been removed and will not be automatically included. Where required, these should be manually added to the database project and managed accordingly; use this [`create-beef-user-defined-types.sql`](./tools/Beef.Database.SqlServer/Migrations/create-beef-user-defined-types.sql) migration script to add.
- *Enhancement:* All code-generated SQL objects have been updated to support replacement, for example `CREATE OR ALTER` versus previous `CREATE`; this potentially minimizes the need to drop and recreate each migration. This _DbEx_ behavior is predicated on not having any `Type` (UDT) schema objects which do not support replacement. It is also therefore recommended that all non-generated schema objects support replacement as they all have to adhere to this pattern to avoid unncessary dropping.
@chullybun chullybun merged commit 7e70917 into master Oct 2, 2024
2 checks passed
@chullybun chullybun deleted the v5.16.0 branch October 2, 2024 20:30
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.

1 participant