You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CDC net changes can be declared (SQL Server) (#426).CdcSupportsNetChanges on a table, or on Template.json as the default for every EnableCDC table in it, is passed to sp_cdc_enable_table as @supports_net_changes. With net changes on, SQL Server adds an index to the change table and generates cdc.fn_cdc_get_net_changes_<instance>; off, readers use fn_cdc_get_all_changes only. Unset keeps what earlier versions produced: off for a table created in the same deploy, SQL Server's own default (on when the table has a primary key) when CDC is turned on for an existing table, and a rotation keeps the value of the instance it replaces. SchemaSmith now tells SQL Server explicitly for a new table, because CDC is now enabled after the table's primary key exists, and SQL Server's default would have silently turned net changes on for every new CDC table. A declared value the newest capture instance does not have rotates to a new instance, like a CdcFilegroup change; true on a table with no primary key is refused by name before CDC is enabled; SchemaTongs extracts it when on and the instance uses the primary key; and --Validate's SS-CDC-001 now also warns when it is set without EnableCDC.
Fixed
EnableCDC did nothing in a SchemaQuench deploy (SQL Server) (#423). v2.7.0 moved CDC enable, disable and rotation into a new step so a capture instance would include computed columns (#420), but only the SQL wrapper SchemaSmith.TableQuench called that step, and SchemaQuench's deploy path does not use that wrapper. A real deploy enabled, rotated and disabled nothing, and reported success. SchemaQuench now runs the step itself, after every column exists.
Table-level Change Tracking and FILESTREAM columns were never applied by a SchemaQuench deploy (SQL Server) (#424). Both shipped in v2.6.0 as steps only that same wrapper called, so EnableChangeTracking, TrackColumnsUpdated and a declared FileStream column deployed as nothing, with no error. SchemaQuench now runs both, after indexes and constraints. Because Change Tracking has never been applied before, leaving EnableChangeTracking out now leaves a table's tracking as it is: only "EnableChangeTracking": false turns it off, so tracking a DBA enabled, or that a package written before v2.6.0 never mentions, keeps its baseline. A declared FileStream column now also enforces SQL Server's requirement for a ROWGUIDCOL column covered by a single-column primary key or unique constraint, and names the table when it is missing.
Below a feature's minimum SQL Server version, the degrade was silent and UnsupportedFeaturePolicy: fail did not abort (#425). Since v2.4.0 the step that neutralizes an unsupported feature and reports it -- or, under fail, refuses the deploy -- ran only from the wrapper. A real deploy still never emitted the unsupported DDL, but recorded no downgrade in the summary, logged nothing, and ignored fail. The same step is what reports EnableCDC on a database where CDC is off, so that report (#401) never reached a real deploy either. SchemaQuench now runs it before any table is created, and a fail refusal stops the deploy before anything changes.
CDC: at the two-capture-instance limit a new column was added before the refusal, and the documented recovery left it uncaptured for good (SQL Server) (#427). The column was added by an earlier step than the headroom check, so a refused deploy had already changed the table; after the operator drained and dropped the older instance as the message says, the next deploy saw no column change and did not rotate, so the capture instance never recorded the column. The limit is now checked before any column is added. SchemaQuench also rotates whenever a CDC table's newest capture instance does not capture exactly the table's current columns, so a column added by a deploy that stopped before the CDC step is captured by the next one. That includes capture instances earlier versions created without a table's computed columns (#420): the first deploy of this version rotates them, keeping the old instance and its history for you to drain and drop. Where both instances are already in use, the deploy warns instead, naming the table.