Skip to content

SchemaSmith v2.8.0

Latest

Choose a tag to compare

@drzacharysmith68 drzacharysmith68 released this 01 Nov 13:46
· 138 commits to main since this release
f4f6cb9

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 JSON type, 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 TIMESTAMP column declared without a default now deploys with no default on MySQL 5.7 and MariaDB before 10.10. Those servers used to invent DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP on the first TIMESTAMP NOT NULL column; SchemaQuench now turns explicit_defaults_for_timestamp on 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 Setup script slot, ahead of every object. A template folder in the new Setup slot 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.
  • --Validate flags 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), Prefer or Require, per environment with a per-table override. Under Prefer an 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+) run WITH (ONLINE = ON) where the edition allows it (Enterprise, Developer, Azure SQL), and the plain statement otherwise; Require refuses instead, naming each statement, before any existing index, key or column changes. On PostgreSQL an index is built CONCURRENTLY, a primary key or unique constraint as its unique index built CONCURRENTLY and attached USING INDEX, an index no longer declared is dropped CONCURRENTLY, and a check or foreign key is added NOT VALID and 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 OVERLAPS keys 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 for ALGORITHM=INSTANT, then INPLACE, LOCK=NONE (and on MariaDB 11.2+ COPY, LOCK=NONE), and an index build or drop for INPLACE, 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 a RebuildPolicy with OnOrderMismatch would 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, under Require too, and says so: a check constraint or foreign key added to an existing SQL Server table, a column change on PostgreSQL. The Deployment Summary gains mode (online, instant, resumable, unavailable, notCovered) on each change it applied to, and its schemaVersion is 1.2.
  • Description on tables, columns, indexes, indexed views, materialized views, sequences, enum types and domain types: one key on every engine. MS_Description on SQL Server, COMMENT on 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, as Comment always has. --Validate: SS-DESC-001, SS-DESC-002.
  • SQL Server: a component's Extensions.ExtendedProperties deploy. 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 ENFORCED on PostgreSQL 18, enforced below it with a downgrade), Validated: false (WITH NOCHECK / NOT VALID; true re-checks the rows), SQL Server NotForReplication and PostgreSQL NoInherit; a PostgreSQL domain constraint takes Validated. SchemaTongs reads them all back, so a disabled or untrusted constraint no longer redeploys enabled and trusted, and a PostgreSQL check whose expression carried NOT VALID no 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 created WITH NOCHECK, re-enables one someone disabled, or strips NOT FOR REPLICATION.
  • MySQL: a check constraint's NOT ENFORCED round-trips. Enforced: false deploys NOT ENFORCED and SchemaTongs reads it back; a declared change drops and re-creates the constraint, and an omitted Enforced leaves it as it is. MariaDB has no such state.
  • MariaDB: a column-level check constraint is a column's CheckExpression again, and stays column-level. It rides CREATE, ADD and MODIFY COLUMN, converges through the column, and is never dropped as an undeclared table-level check (which also stops the deploy failing on a JSON column's own json_valid check). --Validate reports a CheckConstraints entry named like a column (SS-CHK-002). MySQL is unchanged.
  • Temporal keys: WithoutOverlaps on a primary key or unique key (PostgreSQL 18, MariaDB 10.5.3) — #516. PostgreSQL: a key whose last column is a range deploys WITHOUT OVERLAPS (GiST is implied). MariaDB: a key whose last IndexColumns part names one of the table's Periods deploys (…, 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: SetNullColumns on 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 with SET 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 is NOT VALID, since the package deploys SET NOT NULL; --Validate warns 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.
  • --Validate checks a full-text index's KeyIndex (SS-FT-001, SQL Server). A KeyIndex that names no declared index, or one that is not unique, single-column, unfiltered and NOT NULL, is an error before the deploy instead of SQL Server's error 7653 during it.
  • --ExitNonZeroOnWarning on every tool. With the switch, or the ExitNonZeroOnWarning setting, a run that would exit 0 but logged a warning exits 1, for pipelines that treat warnings as failures; a --Validate board with warnings and no errors counts. Failure codes are unchanged.
  • --Validate reports 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) writes CREATE OR ALTER, 2016 SP1+; Legacy writes a guarded CREATE stub plus ALTER with the full body for a package that deploys below that.
  • --Validate warns when a SQL Server package's MinimumVersion admits a build that rejects CREATE OR ALTER (SS-VER-002). 2016 covers the RTM build, where the statement is a syntax error; set 2017 or later, or extract with ModuleSyntax: Legacy.
  • SQL Server: spatial indexes are declared in the table package — #526. A table's SpatialIndexes list names each index's geometry or geography Column and, optionally, its Tessellation, BoundingBox, Grids, CellsPerObject, FillFactor and CompressionType. 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 --IndexOnly deploys behave the same. Below SQL Server 2012 an AUTO_GRID scheme is created as the GRID scheme of its family, with a downgrade recorded, and a compressed one is created uncompressed, also with a downgrade. --Validate checks the column, the scheme's family, the bounding box and the grids (SS-SPX-001 to SS-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. --Validate warns 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 shape pg_dump uses, 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 to Template.json only when something is extracted into them, so a package without them stays loadable by earlier releases. New ShouldCast keys: 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 the sql_mode it was created in (ORACLE, or from 11.4 any mode), so a redeploy replaces both. The folder is added to Template.json only when a package is extracted. New ShouldCast key: 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. Every objectChanges.details[] row in the JSON now names its server and database, and its schema on a schema template, since a fleet run makes the same change in many places.
  • --Validate warns 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 as RESTRICT (SS-FK-009); MD5(), SHA1() or SHA() in an expression, removed in MySQL 9.6 (SS-COL-004); NVARCHAR / NCHAR, which create a deprecated utf8mb3 column (SS-COL-005); and FLOAT(M,D), UNSIGNED on FLOAT, DOUBLE or DECIMAL, and ZEROFILL, 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 --Validate refused it (SS-IDENT-001). Tables, schemas, columns, indexes, keys, check and exclude constraints, statistics, the replica identity index, renames by OldName, materialized views, enum types, sequences and domain types named that way now deploy, redeploy unchanged and extract under their own names; SS-IDENT-001 is gone. In a column list, write such a name quoted with its inner quotes doubled, as extraction does. A table or column Name still wrapped in double quotes, the form SS-IDENT-001 refused, has one wrapping pair stripped as an OldName does, with a warning (SS-IDENT-003), rather than deploying under a name that keeps the quotes.
  • --Validate stops 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, for KEY partitioning and the COLUMNS forms. The two existing MySQL partitioning checks, SS-PART-003 and SS-PART-004, are now documented.
  • --Validate stops 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 a PartitionCount that disagrees with the named partitions (SS-PART-010).
  • SQL Server: ordered columnstore indexes (Order). A columnstore index's ORDER (…) 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: XmlCompression on XML indexes (SQL Server 2022+). A primary or secondary XML index declares XmlCompression: true to be created WITH (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 through UnsupportedFeaturePolicy.
  • SQL Server: selective XML indexes are declared in the table package (SQL Server 2012 SP1+) — #552. An XML index with Selective (its Namespaces and Paths, each path optionally typed as XQuery or SQL, with MaxLength and SingletonCardinality) is created as a selective XML index, and one with ForPath as 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 --IndexOnly deploys; 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 with DropUnknownIndexes drops it. --Validate refuses a selective XML index that declares no Paths (SS-XML-001).
  • SQL Server: JSON indexes are declared in the table package (SQL Server 2025) — #554. A table's JsonIndexes list names each index's json Column and, optionally, its Paths (none means the whole document), OptimizeForArraySearch, FillFactor and CompressionType (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 --IndexOnly deploys behave the same. Below 2025 a declared JSON index is skipped and a downgrade is recorded. --Validate checks the column, one index per column, the paths and the clustered primary key (SS-JSX-001 to SS-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 with DropUnknownIndexes drops it.

Changed

  • Debug SQL files are written only when you ask, and hold the real values — #576. Every deploy used to write a .sql file for each generated step, plus one for each failing script, into ArtifactPath, which is the working folder by default (a CI agent's workspace, or the package folder). ScrubArtifacts masked secrets inside the SQL in a way that left runnable SQL writing the placeholder (SET Email = '***'). Now nothing is written unless WriteDebugSql (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 to IgnoreDuplicateKey on 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's IGNORE_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 --ResumeQuench point 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-level Before and After scripts run again, as they do on every deployment.
  • PostgreSQL: a foreign key's MatchType defaults to SIMPLE, the engine's own default, not FULL. An omitted MatchType used to deploy MATCH FULL, stricter than what CREATE TABLE gives. 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 an ObjectType and RunScriptsTwice always run; SkipUnchangedObjects: false restores 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 / wouldReapply in 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 / wouldDrop in 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 TRIGGER and sp_settriggerorder batches, 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. ALTER strips 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/*.json file 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 a CREATE SEQUENCE script. A .sql file in Sequences/ 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 its ALGORITHM, SQL SECURITY and CHECK OPTION, a routine or trigger its own sql_mode, a trigger its FOLLOWS; DEFINER is removed as before.
  • MySQL and MariaDB: a declared event carries its TimeZone and SqlMode, and Starts when 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 exits 0; with no settings file at all it names where it looked and exits 2.
  • A JSON data delivery now deploys on a SQL Server database below compatibility level 130. It used to be skipped there under the default warn policy, or to abort the run under fail, 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, not 3, 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 --AllowDrops category 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 1 when 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 exit 0 with a warning; the summary now counts them under Skipped and Invalid and says the extraction is incomplete. A failed table still exits 2.
  • SchemaQuench exits 1 when it downgrades a feature the target lacks. Under UnsupportedFeaturePolicy: warn (the default) a skipped or reduced feature is recorded in the deployment summary, but the run exited 0, so automation could not tell it from a complete deploy. The summary's outcome is now Incomplete, and data deliveries skipped on MySQL below 8.0 are listed among the downgrades. fail still refuses the deploy.
  • Every tool exits 2, not 3, 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 broken TemplateTargets rule, and a --ConfigFile that does not exist. These used to surface as an unhandled exception (exit 3), with a stack trace on the console. Exit 3 now means a defect in the tool.
  • An unrecognized command-line argument now stops every tool before it connects, and --WhatIf is a SchemaQuench switch — #443. It used to be a warning and the run went ahead, so SchemaQuench --WhatIf, a switch that did not exist, deployed for real. Every tool now exits 2 and changes nothing, and --WhatIf is the same dry run as WhatIfONLY. Unknown settings keys are still a warning.
  • SchemaTongs writes columns in the table's own order by default — #446. Product:ObjectOrder defaults to Physical, 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; set ObjectOrder to Name for the previous alphabetical order.
  • SchemaSmith no longer uses MySQL syntax the server reports as deprecated. The BINARY operator (warning 1287 from 8.0.27) is now CAST(... AS BINARY), which works back to 5.7; a utf8mb3 variable is gone; and an event with "Status": "DISABLE ON SLAVE" is created with DISABLE ON REPLICA on MySQL 8.4 and later, where the SLAVE spelling 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-arm64 zip is still attached to every GitHub release.
  • SQL Server: DropUnknownIndexes drops 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 an After script creates into the package, or with DropUnknownIndexes on 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 WhatIf too, so a preview of such a database shows nothing to do; on MySQL and MariaDB the copy is a real table for a moment, so WhatIf skips the check and still reports those expressions as changes, as before.
  • PostgreSQL: a schema template that declares a Publications folder 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 in TemplateOrder.
  • --Validate compares PostgreSQL names exactly. SchemaSmith deploys every PostgreSQL name quoted, so a foreign key to Customer where the table is declared customer fails 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.
  • --Validate resolves a foreign key within its own template. Each template deploys to the databases its DatabaseIdentificationScript names, 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 warning SS-FK-010, naming the template that declares the table. Templates with the same identification script still resolve against each other.

Deprecated

  • ScrubArtifacts is deprecated and ignored — #576. Debug SQL is written only with WriteDebugSql, and holds the real values; a run that sets ScrubArtifacts logs a warning. The setting will be removed in a later release.
  • Deferrable and InitiallyDeferred on 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.
  • Comment on a MySQL or MariaDB table, column, index, full-text index or event is now Description. The old key still deploys and --Validate reports it (SS-DESC-002); re-extracting rewrites it. A SQL Server MS_Description left inside Extensions.ExtendedProperties is honoured the same way.
  • ShouldCast:ScriptDynamicDependencyRemovalForFunctions does 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.