Repository navigation
Breaking Changes
- The MySQL floor is now 5.7.22 on the 5.7 line and 8.0.23 on the 8.0 line. Earlier patches are refused before anything runs, naming the detected version: on them DataTongs extracted nothing and still exited 0, and deploys failed or churned on features those patches lack. DataTongs now checks its source against the floor too. Upgrade within the line to continue.
- The MariaDB floor is now 10.2.13. MariaDB 10.2.12 and earlier are refused before anything runs, naming the detected version. SchemaSmith's helpers declare the
JSONtype, which MariaDB added in 10.2.7, so on earlier patches the deploy failed while it was installing them; on 10.2.7 and 10.2.8 every JSON function that builds a string holding a backtick returns NULL, so SchemaTongs extracted no table and DataTongs no row containing one; and table data delivery arrived altered on 10.2.9 and 10.2.10 and ran the server out of memory on 10.2.11 and 10.2.12. Upgrade within the 10.2 line to continue. - A
TIMESTAMPcolumn declared without a default now deploys with no default on MySQL 5.7 and MariaDB before 10.10. Those servers used to inventDEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMPon the firstTIMESTAMP NOT NULLcolumn; SchemaQuench now turnsexplicit_defaults_for_timestampon for its own table work, so a column gets exactly the default its package declares. A database deployed from such a package loses the invented auto-update on the next deploy; to keep it, declare"Default": "CURRENT_TIMESTAMP"and"OnUpdateCurrentTimestamp": "CURRENT_TIMESTAMP". Packages extracted by SchemaTongs are unaffected.
Added
- A
Setupscript slot, ahead of every object. A template folder in the newSetupslot runs after the helpers are deployed and the baseline is validated, and before the first object pass, so a database option, CDC or Change Tracking that the objects or later scripts rely on is in place first. Its scripts run on every deploy, in alphabetical order, and are not recorded as run-once, so a setting changed by hand is put back; write each one to check before it changes anything. The first failure stops the deploy. WhatIf lists them without running them, a resumed run skips the ones that succeeded, and a schema template runs them once per schema. No default folder uses the slot. --Validateflags an expression default extracted by an older SchemaSmith (MySQL, MariaDB). Before 2.8, an expression default was extracted as a quoted string ('CONCAT(''A'',''B'')'), which deploys as that text.SS-COL-007, a warning, names each one: re-extract the package, or write the expression in parentheses.OnlineApply: index and column changes without blocking the table (SQL Server, PostgreSQL, MySQL, MariaDB) — #564. A new setting,Off(the default, today's statements),PreferorRequire, per environment with a per-table override. UnderPreferan index, primary key or unique constraint built on an existing table, a compression or fill-factor rebuild, a changed clustered index's drop, and a column change (2016+) runWITH (ONLINE = ON)where the edition allows it (Enterprise, Developer, Azure SQL), and the plain statement otherwise;Requirerefuses instead, naming each statement, before any existing index, key or column changes. On PostgreSQL an index is builtCONCURRENTLY, a primary key or unique constraint as its unique index builtCONCURRENTLYand attachedUSING INDEX, an index no longer declared is droppedCONCURRENTLY, and a check or foreign key is addedNOT VALIDand validated on its own, each run by SchemaQuench just after the step that needs it; a failed concurrent build is dropped and tried once more. Exclusion constraints,WITHOUT OVERLAPSkeys and indexes on partitioned tables are built the plain way, as is a foreign key on a partitioned table before PostgreSQL 18. On MySQL and MariaDB a column add, drop or change asks forALGORITHM=INSTANT, thenINPLACE, LOCK=NONE(and on MariaDB 11.2+COPY, LOCK=NONE), and an index build or drop forINPLACE, LOCK=NONE; the engine decides, and a refusal moves to the plain statement (Prefer) or stops the deploy (Require). A column added there goes where it is declared instead of last, so the table needs no rebuild to be in order, and MySQL 8.0.29+ warns when a table nears its instant row-version limit and rebuilds at it. A table aRebuildPolicywithOnOrderMismatchwould rebuild only to put its columns in order has them moved in place instead (instantly on MariaDB 10.4+).OnlineApplyMaxDuration(2019+) makes a new index a resumable build; when its time runs out SQL Server pauses it, and the next deploy resumes it, or abandons it when the index is no longer declared. Columnstore, XML, spatial and JSON indexes are built offline. A change OnlineApply has no form for runs as written, underRequiretoo, and says so: a check constraint or foreign key added to an existing SQL Server table, a column change on PostgreSQL. The Deployment Summary gainsmode(online,instant,resumable,unavailable,notCovered) on each change it applied to, and itsschemaVersionis 1.2.Descriptionon tables, columns, indexes, indexed views, materialized views, sequences, enum types and domain types: one key on every engine.MS_Descriptionon SQL Server,COMMENTon PostgreSQL, MySQL and MariaDB. A declared description is set or updated in place,""removes it, and SchemaTongs writes it. An omitted one leaves the database's own alone on SQL Server and PostgreSQL; on MySQL and MariaDB, where the comment is part of the definition, it clears it, asCommentalways has.--Validate:SS-DESC-001,SS-DESC-002.- SQL Server: a component's
Extensions.ExtendedPropertiesdeploy. Extended properties declared on a table, column, index, foreign key or check constraint are added, updated in place or removed (""/null); a name the package does not mention is left alone. SchemaTongs always wrote the bag; SchemaQuench now applies it, on the XML encoding too. - A foreign key's and check constraint's enforcement and validation state are part of the package (SQL Server, PostgreSQL) — #513, #514, #515.
Enforced: false(NOCHECK/NOT ENFORCEDon PostgreSQL 18, enforced below it with a downgrade),Validated: false(WITH NOCHECK/NOT VALID;truere-checks the rows), SQL ServerNotForReplicationand PostgreSQLNoInherit; a PostgreSQL domain constraint takesValidated. SchemaTongs reads them all back, so a disabled or untrusted constraint no longer redeploys enabled and trusted, and a PostgreSQL check whose expression carriedNOT VALIDno longer fails to deploy. An omitted attribute leaves an existing constraint as it is: a package that does not mention them never re-validates a constraint createdWITH NOCHECK, re-enables one someone disabled, or stripsNOT FOR REPLICATION. - MySQL: a check constraint's
NOT ENFORCEDround-trips.Enforced: falsedeploysNOT ENFORCEDand SchemaTongs reads it back; a declared change drops and re-creates the constraint, and an omittedEnforcedleaves it as it is. MariaDB has no such state. - MariaDB: a column-level check constraint is a column's
CheckExpressionagain, and stays column-level. It ridesCREATE,ADDandMODIFY COLUMN, converges through the column, and is never dropped as an undeclared table-level check (which also stops the deploy failing on aJSONcolumn's ownjson_validcheck).--Validatereports aCheckConstraintsentry named like a column (SS-CHK-002). MySQL is unchanged. - Temporal keys:
WithoutOverlapson a primary key or unique key (PostgreSQL 18, MariaDB 10.5.3) — #516. PostgreSQL: a key whose last column is a range deploysWITHOUT OVERLAPS(GiST is implied). MariaDB: a key whose lastIndexColumnspart names one of the table'sPeriodsdeploys(…, period WITHOUT OVERLAPS); SchemaTongs names the period from 11.4. Below each floor the key is created without the clause and a downgrade recorded.--Validate:SS-IDX-002,SS-IDX-003. - PostgreSQL:
SetNullColumnson a foreign key (ON DELETE SET NULL (col, ...), PostgreSQL 15) — #517. The subset of the key's columns a delete sets to NULL, or to its default withSET DEFAULT; it round-trips, and below 15 the key is created with the plain action and a downgrade recorded (--Validate:SS-FK-007). SchemaTongs warns when a PostgreSQL 18 NOT NULL constraint isNOT VALID, since the package deploysSET NOT NULL;--Validatewarns when a check or foreign key is named<table>_<column>_not_null(SS-COL-003). - SQL Server: an edge table's
EdgeConstraints(CONNECTION ... ON DELETE ..., SQL Server 2019). Which node tables the edges may connect and what a delete of a connected node does. SchemaTongs extracts them; a changed clause or action re-creates the constraint, a reordered clause does not; below 2019 the edge table deploys without it and a downgrade is recorded.--Validate:SS-TBL-003,SS-TBL-004. --Validatechecks a full-text index'sKeyIndex(SS-FT-001, SQL Server). AKeyIndexthat names no declared index, or one that is not unique, single-column, unfiltered andNOT NULL, is an error before the deploy instead of SQL Server's error 7653 during it.--ExitNonZeroOnWarningon every tool. With the switch, or theExitNonZeroOnWarningsetting, a run that would exit0but logged a warning exits1, for pipelines that treat warnings as failures; a--Validateboard with warnings and no errors counts. Failure codes are unchanged.--Validatereports a PostgreSQL name longer than 63 bytes (SS-IDENT-002). PostgreSQL truncates such a name with only a notice, so the object was created under a shorter name and the next deploy, looking for the declared one, failed creating it again. The limit is in bytes, so a name in multi-byte characters reaches it sooner than its length suggests.- SchemaTongs can write SQL Server modules in a form every supported version runs:
ShouldCast:ModuleSyntax.CreateOrAlter(the default) writesCREATE OR ALTER, 2016 SP1+;Legacywrites a guardedCREATEstub plusALTERwith the full body for a package that deploys below that. --Validatewarns when a SQL Server package'sMinimumVersionadmits a build that rejectsCREATE OR ALTER(SS-VER-002).2016covers the RTM build, where the statement is a syntax error; set 2017 or later, or extract withModuleSyntax: Legacy.- SQL Server: spatial indexes are declared in the table package — #526. A table's
SpatialIndexeslist names each index'sgeometryorgeographyColumnand, optionally, itsTessellation,BoundingBox,Grids,CellsPerObject,FillFactorandCompressionType. SchemaTongs extracts them and a redeploy changes nothing. A declared attribute that differs re-creates the index, and one left out is not compared. A clustered primary key change takes them with it and puts them back, and full and--IndexOnlydeploys behave the same. Below SQL Server 2012 anAUTO_GRIDscheme is created as theGRIDscheme of its family, with a downgrade recorded, and a compressed one is created uncompressed, also with a downgrade.--Validatechecks the column, the scheme's family, the bounding box and the grids (SS-SPX-001toSS-SPX-004). - SQL Server: an extracted package with Always Encrypted columns deploys to an empty database — #528. SchemaTongs writes every column master key and column encryption key to
Prerequisites/AlwaysEncryptedKeys.sql, a generated script that creates only the keys a database lacks and runs ahead of the tables.Prerequisites/is a new default folder in the Objects slot; a template that lists its folders gets it added the first time a prerequisite is written.--Validatewarns about a hand edit to a generated script, which the next extraction would overwrite (SS-GEN-001). - SQL Server: row-level security policies are extracted — #528. SchemaTongs writes each policy, with its filter and block predicates and options, to the new
SecurityPolicies/folder (ShouldCast:SecurityPolicies). The script creates a missing policy, leaves a matching one alone, and re-creates one that differs inside a transaction, so the table is never unprotected. Before, policies were not extracted at all. - PostgreSQL: range types, text search configurations, operators, casts and event triggers are extracted — #574. Each is scripted to its own folder (
Range Types/,Text Search Configurations/,Operators/,Casts/,Event Triggers/) in the shapepg_dumpuses, so a package from a database that uses them deploys to an empty one. A text search configuration brings the dictionaries it maps to and puts its mappings back on every deploy; an event trigger is re-created with its enabled state; range types, operators and casts are created where missing. The folders are added toTemplate.jsononly when something is extracted into them, so a package without them stays loadable by earlier releases. NewShouldCastkeys:RangeTypes,TextSearchConfigurations,Operators,Casts,EventTriggers. Base types, operator classes and families, and text search parsers and templates, which need support functions compiled into a server library, are named in a warning instead of being left out silently. - MariaDB: packages are extracted — #575. Each package and its body are written to
Packages/as one script that drops the package and creates each half under thesql_modeit was created in (ORACLE, or from 11.4 any mode), so a redeploy replaces both. The folder is added toTemplate.jsononly when a package is extracted. NewShouldCastkey:Packages. SchemaTongs also names and skips a MySQL routine written in a language other than SQL (LANGUAGE JAVASCRIPT, which needs MySQL Enterprise's MLE component), rather than writing a script a server without the component cannot run. - The deployment summary of a failed run lists what it had applied. Nothing a failed run applied is rolled back, so the Markdown summary of a failed or aborted run now has an "Applied Before The Failure" section: the migration scripts and object scripts that ran, the schema changes made and the tables whose data was delivered, grouped under each server and database it reached, with a pointer to
--ResumeQuench. EveryobjectChanges.details[]row in the JSON now names itsserveranddatabase, and itsschemaon a schema template, since a fleet run makes the same change in many places. --Validatewarns about MySQL-family declarations that deploy but will not behave as written. A foreign key to columns that are not a whole primary or unique key, which MySQL 8.4 refuses by default (SS-FK-008, and SchemaTongs names each one it extracts from MySQL);SET DEFAULT, which MySQL and MariaDB accept and then treat asRESTRICT(SS-FK-009);MD5(),SHA1()orSHA()in an expression, removed in MySQL 9.6 (SS-COL-004);NVARCHAR/NCHAR, which create a deprecatedutf8mb3column (SS-COL-005); andFLOAT(M,D),UNSIGNEDonFLOAT,DOUBLEorDECIMAL, andZEROFILL, deprecated since MySQL 8.0.17 (SS-COL-006).- PostgreSQL: a name with a double quote in it deploys. PostgreSQL allows
"inside a name; SchemaSmith wrapped stored names in double quotes without escaping, so such a name emitted invalid DDL and--Validaterefused it (SS-IDENT-001). Tables, schemas, columns, indexes, keys, check and exclude constraints, statistics, the replica identity index, renames byOldName, materialized views, enum types, sequences and domain types named that way now deploy, redeploy unchanged and extract under their own names;SS-IDENT-001is gone. In a column list, write such a name quoted with its inner quotes doubled, as extraction does. A table or columnNamestill wrapped in double quotes, the formSS-IDENT-001refused, has one wrapping pair stripped as anOldNamedoes, with a warning (SS-IDENT-003), rather than deploying under a name that keeps the quotes. --Validatestops a MySQL or MariaDB partitioning that a key does not cover (SS-PART-005). Every primary and unique key must hold each partitioning column whole, and the engine refuses a table where one does not, including where the key holds only a prefix of the column. The linter now reports it before the deploy, forKEYpartitioning and theCOLUMNSforms. The two existing MySQL partitioning checks,SS-PART-003andSS-PART-004, are now documented.--Validatestops three more MySQL-family partitioning shapes the engine refuses. A foreign key on or to a partitioned table (SS-PART-008), renaming a column the partitioning uses on MySQL (SS-PART-009), and aPartitionCountthat disagrees with the named partitions (SS-PART-010).- SQL Server: ordered columnstore indexes (
Order). A columnstore index'sORDER (…)columns are extracted, created, compared and re-created on a change: a clustered columnstore from SQL Server 2022, a nonclustered one from 2025. Below that the index is created unordered and a downgrade recorded. The order was lost before, so an ordered index arrived unordered on the target. - SQL Server:
XmlCompressionon XML indexes (SQL Server 2022+). A primary or secondary XML index declaresXmlCompression: trueto be createdWITH (XML_COMPRESSION = ON); each has its own setting, as the engine keeps it. It is extracted and compared where the server reports XML compression, and a change re-creates the index. Below 2022 the clause is left out and reported throughUnsupportedFeaturePolicy. - SQL Server: selective XML indexes are declared in the table package (SQL Server 2012 SP1+) — #552. An XML index with
Selective(itsNamespacesandPaths, each path optionally typed as XQuery or SQL, withMaxLengthandSingletonCardinality) is created as a selective XML index, and one withForPathas a secondary selective index on that path. SchemaTongs extracts them instead of leaving them out with a warning; a changed path or namespace re-creates the index and its secondaries, on both ingest tiers and in--IndexOnlydeploys; below 2012 SP1, or on a 2012 database where the feature is off, they are skipped and a downgrade is recorded. Because they can be declared, a selective XML index the package does not declare is now unknown like any other index, so a deploy withDropUnknownIndexesdrops it.--Validaterefuses a selective XML index that declares noPaths(SS-XML-001). - SQL Server: JSON indexes are declared in the table package (SQL Server 2025) — #554. A table's
JsonIndexeslist names each index'sjsonColumnand, optionally, itsPaths(none means the whole document),OptimizeForArraySearch,FillFactorandCompressionType(DATA_COMPRESSION, compared only when declared). SchemaTongs extracts them instead of leaving them out with a warning, and a redeploy changes nothing. A changed path, column, array-search option, or declared fill factor or compression re-creates the index, and paths are compared as a set and case-sensitively; a clustered primary key change takes them with it and puts them back; full and--IndexOnlydeploys behave the same. Below 2025 a declared JSON index is skipped and a downgrade is recorded.--Validatechecks the column, one index per column, the paths and the clustered primary key (SS-JSX-001toSS-JSX-004). Because they can be declared, a JSON index the package does not declare is now unknown like any other index, so a deploy withDropUnknownIndexesdrops it.
Changed
- Debug SQL files are written only when you ask, and hold the real values — #576. Every deploy used to write a
.sqlfile for each generated step, plus one for each failing script, intoArtifactPath, which is the working folder by default (a CI agent's workspace, or the package folder).ScrubArtifactsmasked secrets inside the SQL in a way that left runnable SQL writing the placeholder (SET Email = '***'). Now nothing is written unlessWriteDebugSql(or--WriteDebugSql) is on, and a failure says how to get the file. The files are never masked, and their header says they hold real values and are not to be shared. A run deletes the previous run's files for the same product and targets when it starts, and its own when it finishes cleanly. It reads the owner from each file's first line, so nothing it did not write is touched. - A change to
PadIndex, or toIgnoreDuplicateKeyon an index that is not a constraint's, rebuilds the index in place (SQL Server). It was dropped and created again. The end state is the same; the index now keeps serving queries during the change, a clustered index's nonclustered indexes are not rebuilt twice, and the foreign keys on a primary key stay where they are. A constraint'sIGNORE_DUP_KEY, which SQL Server cannot change in place, is still dropped and re-created. - A deploy no longer discards another target's resume point. A plain run deleted every checkpoint of the product, so a failed deploy to one database lost its
--ResumeQuenchpoint to a plain deploy of the same product to another. A run now discards and cleans up only the checkpoints of the databases it deploys. Resume works per database: a resumed run enters every template again, each database continues from its own checkpoint, and product-levelBeforeandAfterscripts run again, as they do on every deployment. - PostgreSQL: a foreign key's
MatchTypedefaults toSIMPLE, the engine's own default, notFULL. An omittedMatchTypeused to deployMATCH FULL, stricter than whatCREATE TABLEgives. Declare"MatchType": "FULL"to keep that; no existing key is re-created by the change. - A second deploy of an unchanged package no longer re-creates every view, function, procedure and trigger. SchemaQuench records a hash of each script and of the engine's rendering of the object (
SchemaSmith.ScriptStamp) and skips the script while both match.[ALWAYS]scripts,-- SchemaSmith: AlwaysRun, folders without anObjectTypeandRunScriptsTwicealways run;SkipUnchangedObjects: falserestores the old behaviour. - Permissions, owners, comments and extended properties now survive a table rebuild and a re-created object. Grants, a
DENY, grant options, owners, SQL Server extended properties and PostgreSQL comments are captured before a rebuild, a re-created indexed or materialized view, a view, function or routine dropped so a column change or a changed function can apply and then re-created from the package, or an object script that drops its routine or view, and put back afterwards (reapplied/wouldReapplyin the manifest). - SQL Server: a changed function or view that schema-bound objects reference now deploys. The dependents the package declares (schema-bound views and functions, check constraints, computed columns, indexed views) are dropped, the change applied and the dependents put back in the same run (
dropped/wouldDropin the manifest); an undeclared or encrypted dependent stops the deploy by name first. - SQL Server: a disabled trigger stays disabled and a first or last trigger keeps its order across a redeploy. SchemaTongs writes the
DISABLE TRIGGERandsp_settriggerorderbatches, and SchemaQuench compares a trigger's state and order, so a hand change on the server re-applies the script. - SQL Server: a signed module is signed again after it changes.
ALTERstrips signatures; the deploy signs the module again with every certificate or asymmetric key whose private key is encrypted by the database master key (resigned/wouldResign), and warns by name when a key cannot be used. - MariaDB: sequences are declared, converged and never reset. A
Sequences/*.jsonfile declares start, increment, bounds, cache, cycle and (from 11.5) type, as on PostgreSQL; SchemaQuench creates or alters it in place and never touches the current value. SchemaTongs writes that JSON instead of aCREATE SEQUENCEscript. A.sqlfile inSequences/keeps working. - MySQL and MariaDB: SchemaTongs writes views, functions, procedures and triggers from the engine's own DDL, so re-extracting a package rewrites those files once — #500. Each object comes from
SHOW CREATE: a view keeps itsALGORITHM,SQL SECURITYandCHECK OPTION, a routine or trigger its ownsql_mode, a trigger itsFOLLOWS;DEFINERis removed as before. - MySQL and MariaDB: a declared event carries its
TimeZoneandSqlMode, andStartswhen the event was created with one. SchemaTongs writes them, SchemaQuench applies and compares them; a package that omits them behaves as before. - Run with no arguments on an install nobody has configured, each tool explains how to configure it instead of failing — #498. With no arguments, no
SmithySettings_variables and every first-run setting blank, the tool prints the settings file it read, what to fill in and the alternatives, then exits0; with no settings file at all it names where it looked and exits2. - A JSON data delivery now deploys on a SQL Server database below compatibility level 130. It used to be skipped there under the default
warnpolicy, or to abort the run underfail, with a message asking for the content to be re-encoded as XML. SchemaQuench now converts the content to the XML shape as it reads it and delivers it through the XML merge, which works at every compatibility level, so nothing is skipped."ContentEncoding": "Xml"still ships the content already in that shape. - SchemaShears exits
2, not3, when a patch request cannot be built, and checks the request before writing anything — #440. A missing source,Product.json, manifest or always-include entry, an existing output, or an unknown--AllowDropscategory is now a reported failure (SchemaShears - Errors.log) found before the package is copied, instead of an unhandled exception that left a half-built patch behind. - SchemaTongs exits
1when the package it writes is missing an object. A script that fails validation, a skipped.sqlerror, an encrypted SQL Server module, an empty definition, or an index kind a package cannot declare used to exit0with a warning; the summary now counts them underSkippedandInvalidand says the extraction is incomplete. A failed table still exits2. - SchemaQuench exits
1when it downgrades a feature the target lacks. UnderUnsupportedFeaturePolicy: warn(the default) a skipped or reduced feature is recorded in the deployment summary, but the run exited0, so automation could not tell it from a complete deploy. The summary'soutcomeis nowIncomplete, and data deliveries skipped on MySQL below 8.0 are listed among the downgrades.failstill refuses the deploy. - Every tool exits
2, not3, for a failure you can fix, and says so in one line. That covers a missing setting such as the platform, a package that cannot be loaded, a failed validation, product script or version check, a refused target, a brokenTemplateTargetsrule, and a--ConfigFilethat does not exist. These used to surface as an unhandled exception (exit3), with a stack trace on the console. Exit3now means a defect in the tool. - An unrecognized command-line argument now stops every tool before it connects, and
--WhatIfis a SchemaQuench switch — #443. It used to be a warning and the run went ahead, soSchemaQuench --WhatIf, a switch that did not exist, deployed for real. Every tool now exits2and changes nothing, and--WhatIfis the same dry run asWhatIfONLY. Unknown settings keys are still a warning. - SchemaTongs writes columns in the table's own order by default — #446.
Product:ObjectOrderdefaults toPhysical, so a table deployed fresh from an extracted package has the column order of the table it came from.PreserveExistingOrder(on by default) keeps the order of files you already have; setObjectOrdertoNamefor the previous alphabetical order. - SchemaSmith no longer uses MySQL syntax the server reports as deprecated. The
BINARYoperator (warning 1287 from 8.0.27) is nowCAST(... AS BINARY), which works back to 5.7; autf8mb3variable is gone; and an event with"Status": "DISABLE ON SLAVE"is created withDISABLE ON REPLICAon MySQL 8.4 and later, where theSLAVEspelling is deprecated. Packages keep the spelling they have. - winget installs the x64 build only. The winget package no longer lists a separate ARM64 installer; on ARM64 Windows it installs the x64 build, which runs under Windows' x64 emulation. The native
win-arm64zip is still attached to every GitHub release. - SQL Server:
DropUnknownIndexesdrops a spatial index the package does not declare. Spatial indexes were left alone because a package could not declare them (#471). Now that it can (#526), an undeclared one is unknown like any other index. Move a spatial index anAfterscript creates into the package, or withDropUnknownIndexeson each deploy drops it and the script creates it again. - A database another tool built no longer has its expressions re-applied on its first SchemaSmith deploy — #508. SchemaSmith remembers what it applied, so an expression it had not applied yet -- every check constraint, computed or generated column, expression default and index filter in a database built by hand or by another tool -- was compared as text, and every one the engine stores in its own words was re-applied once: a check re-validated against every row, a filtered unique index dropped and rebuilt. The same happened whenever a declaration was reworded without changing its meaning. Before re-applying such an expression, SchemaQuench now applies the declared text to an empty copy of the table and reads back what the engine stored; when that is exactly the live text, the object is recorded and left alone. A real difference is still applied. On SQL Server and PostgreSQL the copy is rolled back and the check runs under
WhatIftoo, so a preview of such a database shows nothing to do; on MySQL and MariaDB the copy is a real table for a moment, soWhatIfskips the check and still reports those expressions as changes, as before. - PostgreSQL: a schema template that declares a
Publicationsfolder is refused. A publication is database-scoped, so a schema template's default folders already left it out and SchemaTongs does not extract one into a schema template; an explicit folder loaded anyway and ran once per schema. It now stops the load with the message the other database-scoped object types get. Move publications to a regular template earlier inTemplateOrder. --Validatecompares PostgreSQL names exactly. SchemaSmith deploys every PostgreSQL name quoted, so a foreign key toCustomerwhere the table is declaredcustomerfails the deploy with "relation does not exist". The linter matched those names without case and passed the package; it now reports the unresolved table (SS-FK-002), the missing related or local column (SS-FK-004,SS-FK-001) and an index on a column of a different case (SS-IDX-001). SQL Server, MySQL and MariaDB still compare names without case.--Validateresolves a foreign key within its own template. Each template deploys to the databases itsDatabaseIdentificationScriptnames, but the linter looked for a key's related table across the whole package, so a key to a table declared only in another template passed and then needed that table on the target at deploy. Such a key now draws the warningSS-FK-010, naming the template that declares the table. Templates with the same identification script still resolve against each other.
Deprecated
ScrubArtifactsis deprecated and ignored — #576. Debug SQL is written only withWriteDebugSql, and holds the real values; a run that setsScrubArtifactslogs a warning. The setting will be removed in a later release.DeferrableandInitiallyDeferredon a PostgreSQL check constraint. PostgreSQL has never accepted them on a CHECK; the deploy no longer emits them, and a package that sets one is stopped as an error (SS-CHK-001) rather than deployed without what it asked for. Removed two releases after 2.8.Commenton a MySQL or MariaDB table, column, index, full-text index or event is nowDescription. The old key still deploys and--Validatereports it (SS-DESC-002); re-extracting rewrites it. A SQL ServerMS_Descriptionleft insideExtensions.ExtendedPropertiesis honoured the same way.ShouldCast:ScriptDynamicDependencyRemovalForFunctionsdoes nothing and SchemaTongs warns when it is set. The preamble it wrote dropped every object that mentioned the function on every deploy; the deploy now drops only the schema-bound dependents a changed module is blocked by, once, and puts them back (see Added). Remove the setting.
Fixed
267 fixes. The full list is in the CHANGELOG.