Represents the NuGet versions.
- Fixed: Re-publish of packages.
- Enhancement: Require a means to add an explicitly named resource-based script outside of the automatic convention-based discovery; see new
MigrationArgs.AddScript
. - Enhancement: Moving the Beef-based standardized SQL Server scripts (functions and stored procedures) to DbEx to enable greater usage. New
MigrationArgs.IncludeExtendedSchemaScripts
extension method will add (leverages newMigrationArgs.AddScript
). - Enhancement: Added PostgreSQL equivalent standardized SQL Server scripts (functions and stored procedures).
- Enhancement: Added command-line option
-dso|--drop-schema-objects
to setMigrationArgs.DropSchemaObjects
directly from the console.
- Fixed: Added
MigrationCommand.CreateMigrateAndCodeGen
. This can be useful in development scenarios where theCodeGen
phase results in a new migration script that needs to be applied before any correspondingSchema
operations are performed; in this case, a secondary migration will be required.
- Enhancement: Added a
DbColumnSchema.SqlType2
that does not include nullability. - Enhancement: The
SqlServerSchemaScript.SupportsReplace
is enabled where aCREATE OR ALTER
is specified. - Enhancement: The SQL Server Event Outbox (CoreEx
v3.25.6
) capabilities now support events as JSON versus existing TVP removing database dependency on a UDT (user-defined type). - Fixed: The logic for finding file-based SQL schema scripts has been corrected.
- Fixed: All related package dependencies updated to latest.
- Fixed: SQL Server
data
merge statement fixed to include theTenantIdColumn
where applicable to avoid possible duplicate key.
- Fixed: Corrected issue introduced in version
2.5.5
where some strings were being incorrectly converted to a guid.
- Fixed: Release build and publish; version
2.5.5
was not published correctly.
- Fixed: Updated
DataParser
to set column with a guid representation of an integer where specified using shorthand notation; i.e. replace^n
values wheren
is an integer with a guid equivalent; e.g.^1
will be converted to00000001-0000-0000-0000-000000000000
. A newDataParserArgs.ReplaceShorthandGuids
had been added to control this behavior (defaults totrue
).
- Fixed: Updated
CoreEx
to version3.21.0
. - Fixed: Updated
DataParser
to set column with JSON (JsonElement.GetRawText
) value versus throwing an exception when the JSON is an object or an array.
- Fixed: Updated
CoreEx
to version3.20.0
. - Fixed: Fixed logging of SQL statements to include the source:
FILE
,RES
(embedded resource) orSQL
(specified statement).
- Fixed: Updated
CoreEx
to version3.18.0
.- Includes removal of
Azure.Identity
dependency; related tohttps://github.com/advisories/GHSA-wvxc-855f-jvrv
.
- Includes removal of
- Fixed: Updated
CoreEx
to version3.15.0
. - Fixed Simplify event outbox C# code-generation templates for primary constructor usage.
- Enhancement: Added PostgreSQL database migrations support.
- Enhancement: Added
DateOnly
andTimeOnly
support (requiresnet7.0
+) (see alsoMigrationArgs.EmitDotNetDateOnly
andMigrationArgs.EmitDotNetTimeOnly
to explicitly enable). - Enhamcement: Improved the
MigrationArgs
support throughout to simplify usage, and improve configurablility and consistency; enabling greater flexibility to control the migration process/activities. - Internal:
- All
throw new ArgumentNullException
checking migrated to thexxx.ThrowIfNull
extension method equivalent. - All Run Code Analysis issues resolved.
- All
- Enhancement: Added
MigrationAssemblyArgs
to allow for the specification of zero or moreData
folder names. - Fixed: Updated
CoreEx
to version3.9.0
.
- Fixed: Updated
CoreEx
to version3.8.0
. - Fixed: Updated
OnRamp
to version2.0.0
which necessitated internal change fromNewtonsoft.Json
(now deprecated) toSystem.Text.Json
; additionally, theDataParser
was refactored accordingly.
- Fixed: All related package dependencies updated to latest.
- Fixed: Updated
CoreEx
to version3.6.1
. - Fixed: Added
net8.0
support.
- Fixed: The
OutBox.EventOutbox
table clustered/non-clustered indexes changed to simplify default implementation. Implementors of this capability should review the indexing, etc., based on usage to optimize.- Note: it is also expected that the Outbox tables are regularly purged, i.e. dequeued events should be removed. This is the responsibility of the implementor to perform as required.
- Enhancement:
DataParser.ParseJsonAsync
added to support JSON data file parsing in addition to the existing YAML. Files (embedded resources) can be mixed and matched as required. - Enhancement:
DataParser
supports specified schema of*
to provideDataConfig
that is applied to all tables in the YAML/JSON file. - Enhancement:
DataParser
supports hierarchical data (i.e parent/child) where the child row(s) are specified as a parent column value (must be an array). Will also attempt to update the child related column from the parent primary key where not specified to simplify specification. - Fixed:
DataParser
supportsbit
values of0
and1
, in addition tofalse
andtrue
respectively. - Fixed:
DataParser
constraint of table only being specified once in the YAML/JSON file has been removed; this is now supported. The underlying database insert or merge operations will be consolidated and executed in the sequence of initial specification.
- Fixed:
DbTableSchema
,DbColumnSchema
andDataParserArgs
now correctly support the full range of by-convention properties (e.g.RowVersion
,TenantId
andIsDeleted
). Both theSqlServerSchemaConfig
andMySqlSchemaConfig
updated to default names as appropriate. Additional properties added toDb*Schema
to support additional code-generation scenarios, etc.
- Fixed: The YAML-based
MigrationCommand.Data
logic previously set theCreatedBy
,CreatedDate
,UpdatedBy
andUpdatedDate
(or specified equivalent) regardless of whether the data was being inserted or merged (insert/update). This has been corrected such that the appropriate values are only set for the specific type of operation being performed; i.e.Created*
-only orUpdated*
-only. - Fixed: Enabled additional command-line arguments to be passed for
MigrationCommand.CodeGen
to enable inherited usage flexibility. RemovedMigrationArgsBase.ScriptName
andMigrationArgsBase.ScriptArguments
and included within existingMigrationArgsBase.Parameters
as singular dictionary of key/value pairs (simplification).
- Fixed:
SqlServerMigration
has been fixed to handle column size ofMAX
correctly.
- Fixed:
SqlServerMigration
updated to correct theDataResetFilterPredicate
to exclude all tables within schemacdc
, and exclude all tables within thedbo
schema where the table name starts withsys
. This is to ensure that the internal Change Data tables are not reset, and that any SQL Server system tables are not inadvertently reset.
- Enhancement: Updated
CoreEx
to version3.3.0
.
- Enhancement: Updated
CoreEx
to version3.0.0
. - Enhancement: Updated all dependent packages to latest versions.
- Enhancement: Added
net6.0
andnet7.0
support in addition to .NET Standard to theDbEx
packages. This will allow access to additional features per version where required, and overall performance improvements. - Enhancement: Included C# code-generation templates updated; target
net6.0
+ only.
- Fixed:
MigrationArgsBase.Assemblies
internal list management simplified; all order/sequencing managed withinDatabaseMigrationBase
implementation to limit issues. Added a newAddAssemblyAfter
to support explicit positioning where needed.
- Fixed: The unquoting of identifiers whilst parsing schema objects resulted in an empty identifier where the quote was not specified; i.e. for SQL Server
[dbo].[name]
worked, whereas,dbo.name
did not; this has been corrected.
- Fixed: The
DotNetType
andSqlType
property value determination has been improved; removed explicitPrepare
to simplify. - Fixed: Added
MigrationArgsBase.AcceptPrompts
to programmatically set the equivalent of the--accept-prompts
command-line option.
- Fixed: Added
IDisposable
toDatabaseMigrationBase
to ensure underlying database connections are correctly disposed (viaIDatabase.Dispose
). - Fixed:
DatabaseJournal
updated to useDatabaseMigrationBase.ReplaceSqlRuntimeParameters
versus own limited implementation. - Fixed: Throw
InvalidOperationException
versus errantNullReferenceException
where required embedded resource is not found.
- Enhancement: Support the execution of
*.post.database.create.sql
migration scripts that will only get invoked after the creation of the database (i.e. a potential one-time only execution).
- Enhancement: Enable
Parameters
to be passed via the command line; either adding, or overridding any pre-configured values. Use-p|--param Name=Value
syntax; e.g.--param JournalSchema=dbo
. - Enhancement: Enable moustache syntax property placeholder replacements (e.g
{{ParameterName}}
), from theParameters
, within SQL scripts to allow changes during execution into the database at runtime. - Enhancement: Added command-line confirmation prompt for a
Drop
orReset
as these are considered highly destructive actions. Supports--accept-prompts
option to bypass prompts within scripted scenarios.
- Fixed: Multibyte support added to the
DataParser
insert and merge for SQL Server strings using theN
prefix.
- Enhancement: Added
DataParserArgs.ColumnDefaults
so that any table column(s) can be defaulted where required (where not directly specified). - Enhancement: Improved help text to include the schema command and arguments.
- Enhancement: Added MySQL database migrations.
- Note: Given the extent of this and previous change a major version change is warranted (published version
v1.1.1
should be considered as deprecated as a result).
- Enhancement: Breaking change: Refactored the implementation/internals/naming to be largely database agnostic, have improved extensibility, to simplify introduction of additional databases (beyond current SQL Server implementation). As part of this exercise
DbUp
was re-introduced to provide the likes of SQL command parsing. The database connection management and implementation ofIDatabaseJournal
remains custom (usingDbUp
convention to enable). TheSqlServerMigrationConsole
implementation moved toDbEx.Console.SqlServer
for separation and consistency.
- Fixed: Corrected issue where comments were removed from the SQL statement when executed against the database; i.e. they were missing from the likes of stored procedures, etc.
- Fixed: Schema create template updated to remove transaction wrap which was invalid.
- Enhancement: Existing namespace
Schema
renamed toDbSchema
. - Enhancement: Updated the outbox code generation templates to support the
Key
column.
- Fixed: Updated to
CoreEx
version1.0.9
andOnRamp
version1.0.6
.
- Fixed: SQL using batch, i.e.
GO
statement, were not being split and executed (indepently) correctly. - Fixed: Standard pattern of
CancellationToken
added to allAsync
methods.
- Fixed:
Reset
command updated to load embedded SQL resource correctly.
- Enhancement: Removed
DbUp
package dependencies and implemented equivalent (basics) that is compatible with[dbo].[SchemaVersion]
journal management. Primary reason is related to the slow uptake of pull requests by the maintainers ofDbUp
that imposes limitations onDbEx
. - Fixed:
DbTypeMapper
updated to supportSMALLDATETIME
andIMAGE
Microsoft Sql Server types.
- Fixed:
Int32.ToGuid
extension method changed toDataValueConverter.IntToGuid
to be more explicit.
- Fixed:
Reset
command fixed to load embedded resource file correctly.
- Enhancement: Updated to
CoreEx.Database
version1.0.7
.
- Enhancement: Removed generic database functionality as this has been ported to
CoreEx.Database
.DbEx
is now focused on tooling only.
- Enhancement: Updated the
EventOutboxEnqueueBase
to handle newEventSendException
and enqueue each individual message as either sent or unsent within the outbox. - Fixed: Updated to
CoreEx
version1.0.5
.
- Fixed: Updated to
CoreEx
version1.0.3
.
- Fixed: Previous version
1.0.6
fix was incorrect; Data import order should not have been reversed. This previous change has been corrected.
- Fixed: Issue 12 fixed. Data import order has been reversed.
- Enhancement: The
EventOutboxEnqueueBase
is the SQL Server event outbox enqueueIEventSender
. To minimize send latency (increasing real-time event delivery) a primary (alternate)IEventSender
can be specified (SetPrimaryEventSender
). This changes the event behaviour whereby the events will be sent via the specified primary first, then enqueued only where the primary fails. The events will still be written to the event outbox but as sent for audit purposes.
- Enhancement: Integrated SQL Server-based
EventOutbox
code-generation (both database and C#) into DbEx to enable re-use and consistency.
- Enhancement: Changed the project to be .NET Standard 2.1 versus targeting specific framework version. This has had the side-effect of losing the ability to execute directly from the command-line. Given this should typically be inherited and then executed, this functionality loss is considered a minor inconvenience.
- Fixed: Issue 7 fixed. Documentation corrected and support for SQL files for both
Data
andExecute
commands added.
- New: Initial publish to GitHub/NuGet. This was originally harvested from, and will replace, the core database tooling within Beef.