Repository navigation
9.44.0
One change: a SQL Server function's creation script can be run more than once.
Full upgrade guide: https://weasel.jasperfx.net/release-9-44
Nothing public was removed and no signature changed.
SQL Server functions survive a re-run of a creation script: #703 / #704
Weasel.SqlServer.Functions.Function rendered a bare CREATE FUNCTION, so a generated script containing a function failed on its second run with "There is already an object named ...". Every other object in a script survives a re-run, and Trigger had this exact problem first.
WriteCreateStatementnow drops the function if it exists, then creates it, the same asTrigger.- New:
Function.CreateStatement()renders the create alone. ⚠️ FunctionDeltanow comparesCreateStatement()rather thanBody().Body()renders throughWriteCreateStatement, so it now carries the drop, and a function read back from the database always gets the default drop statement. ComparingBody()would have reported a function declared with custom drop statements as changed on every migration. A test pins it.
A function's creation script now begins with its drop. That fails for a function referenced WITH SCHEMABINDING, which the update path, already drop-then-create, would hit anyway.