RESTRICT is a referential action in its own right.ReferentialAction.Restrict is parsed, written and rendered.
SqlDialect.SupportsRestrict says whether the engine has RESTRICT as distinct from NO ACTION. Providers have to opt in.
A generated column records whether it is stored.Column.IsStored and the NSQL STORED / VIRTUAL keywords.
SqlDialect.SupportsVirtualGeneratedColumns says whether the engine can leave one unstored. Off by default, matching Postgres, which stores every generated column.
virtual-generated-column-not-supported is a warning: a virtual generated column declared against an engine that always stores.
A column records whether it is the table’s row identifier for merge replication.Column.IsRowGuid and the NSQL ROWGUIDCOL keyword.
A column default can carry its constraint’s name.Column.DefaultConstraintName and the NSQL CONSTRAINT <name> DEFAULT <expr> form, for engines that make a default a named constraint.
An identity and a trigger can stand aside for a replication agent.IdentityOptions.NotForReplication, Trigger.IsNotForReplication, and the NSQL NOT FOR REPLICATION form on both.
DiagnosticSources declares every source the engine reports under, and DiagnosticSources.All offers them to a caller checking a configured name against the sources that exist.
Changed
Diagnostic sources and codes are a configuration contract, so this release settles their naming before the next CLI makes them addressable from .editorconfig.
Fixed
Trigger.Clone(), Equals and GetHashCode cover every field, as Column’s now do. Both enumerate fields by hand, and import clones every object on its way to a file.
Statements contain their originating action type.SqlStatement.Action names the MigrationAction a statement came from, and is included in the plan file.
Fixed
Invalid plan files now throw immediately. The JSON held in a plan file is now more strictly deserialized so as to catch an invalid payload earlier.
SqlStatement keeps the constructor providers were built against. 5.9.1 added the action as a positional parameter, which deletes the arity every already-compiled provider calls.
Authored check constraints settle. Check expressions are opaque SQL, rewritten by the engine, so a handwritten constraint would never match. Both definitions are now kept and declared like-for-like as they are for triggers, and routines.
SqlDialect.SupportsComments says whether the engine records a comment at all. True unless a dialect says otherwise, which is the opposite of the other capabilities: they describe something extra an engine might do, while this describes something nearly every engine does, so a provider built before the flag has to keep meaning yes.
comments-not-supported is a warning: documentation declared against an engine that records none, naming every object it covers in one finding rather than one per action skipped while rendering.
Every remaining authored expression settles. Column defaults and generated expressions, index and exclusion predicates, and a domain’s checks and default are opaque SQL, rewritten by the engine, so a handwritten one would never match. All are now kept and declared like-for-like as they are for triggers, routines etc. An expression the database no longer reports is still drift, not a spelling to restore.
Renaming a type no longer retypes the columns declared against it. The rename moved the type but left every reference naming the old one, so each column read as a retype.
Recreate is now correctly blocked by dependents. Recreating a type that’s in use now causes an error.
An identity that explicitly declares no options no longer differs from one that does so implicitly. No options at all and a set of unstated ones now compare equal.
A sequence altered for one reason no longer restates the others. The change carries the folded options, so a plan that changes the cache does not also restate a start it never asked to change.
Identity and sequence restarts now warn correctly. Restarts are data hazards: restarting the counter, means duplicate values are issued, meaning inserts collide with what is already stored.