@@ -417,7 +417,7 @@ export const HASH_SHADOW_SUFFIX = '__hash';
417417 * orphan pass reports as `unmapped_column` with a `drop_column` op. Dropping it
418418 * would take the UNIQUE index it carries with it, silently returning the object
419419 * to "registered but its declared uniqueness unenforced" — the very state
420- * #11374/# 11627 exist to end, reached this time through the migration tool
420+ * #11627 and commit d0e3a885b exist to end, reached this time through the migration tool
421421 * rather than through a refused DDL.
422422 *
423423 * Matched by SUFFIX rather than by a registry of known names, deliberately: the
@@ -448,7 +448,7 @@ export function isHashShadowColumn(name: string): boolean {
448448 * 64-character identifier limit.
449449 *
450450 * ⚠️ Lives HERE, beside {@link isHashShadowColumn}, rather than in the driver:
451- * #13015 was the price of the split. The ORPHAN-column pass knew the shadow
451+ * The defect commit cd1348802 fixed was the price of the split. The ORPHAN-column pass knew the shadow
452452 * vocabulary and the INDEX differ did not, so a healthy shadow-carried UNIQUE
453453 * had its column protected from a drop while the index that column carries was
454454 * proposed for a destructive rebuild. Both passes now ask the same module the
@@ -473,7 +473,7 @@ export function hashShadowColumnFor(indexName: string): string {
473473/**
474474 * One key part a hash shadow hashes: the column identity, and whether the
475475 * generation expression folds it through the NULL-safe `COALESCE(col, ...)`
476- * form (ADR-0120 D3, carried into the shadow by #12998 ).
476+ * form (ADR-0120 D3, carried into the shadow by commit df1c75c4b ).
477477 */
478478export interface HashShadowKeyPart {
479479 column : string ;
@@ -482,16 +482,16 @@ export interface HashShadowKeyPart {
482482
483483/**
484484 * Read the DECLARED key parts back out of a hash shadow's stored
485- * `GENERATION_EXPRESSION` (#13015 ).
485+ * `GENERATION_EXPRESSION` (commit cd1348802 ).
486486 *
487487 * This is what makes a shadow-carried key COMPARABLE rather than merely
488- * skippable. Since #12998 the expression carries the NULL-safe parts in their
488+ * skippable. Since commit df1c75c4b the expression carries the NULL-safe parts in their
489489 * COALESCE spelling, so the FORM of the key — which columns, and which of them
490490 * are folded — survives the round trip, and the differ can ask the real
491491 * question ("does this shadow enforce what metadata declares?") instead of the
492492 * blind one ("is this a shadow at all?").
493493 *
494- * ⛔ Why the blind question is not good enough: a shadow created BEFORE #12998
494+ * ⛔ Why the blind question is not good enough: a shadow created BEFORE commit df1c75c4b
495495 * hashes the RAW columns, so `CONCAT` returns NULL for every NULL-organization
496496 * row and the rows the COALESCE bucket exists to constrain are constrained by
497497 * nothing (#5030's shape). It is indistinguishable BY NAME from a healthy one.
@@ -858,7 +858,7 @@ export function diffManagedTable(args: {
858858 columns : PhysicalColumn [ ] ;
859859 dialect : SqlDialectName ;
860860 /**
861- * Which columns an index KEYS ON (#11374 ), keyed by field name — the exact
861+ * Which columns an index KEYS ON (commit d0e3a885b ), keyed by field name — the exact
862862 * map {@link indexedKeyColumns} builds. Consulted ONLY by the varchar-length
863863 * branch below, through {@link varcharColumnChars}, to answer the same
864864 * question `createColumn` asks before it sizes a text-family column.
@@ -1703,7 +1703,7 @@ export interface PhysicalIndex {
17031703 /**
17041704 * When this index is physically carried by a #11627 hash shadow, the
17051705 * DECLARED key parts that shadow hashes, read back from the generation
1706- * expression (#13015 via #12998 ) by `SqlDriver.introspectIndexes`.
1706+ * expression (commit cd1348802 via commit df1c75c4b ) by `SqlDriver.introspectIndexes`.
17071707 *
17081708 * Absent both when the index is NOT shadow-carried and when it is but the
17091709 * expression could not be read. {@link isHashShadowCarrier} tells those two
@@ -2029,7 +2029,7 @@ export function diffUnbuildableIndexes(args: {
20292029 * field-level `unique` through {@link uniqueIndexesFromFields}, object-level
20302030 * `indexes[]` through {@link normalizeDeclaredIndex} — so "which columns end up
20312031 * in a key" has ONE answer, shared by the index sync that creates them and by
2032- * the DDL that has to make them keyable in the first place (#11374 ).
2032+ * the DDL that has to make them keyable in the first place (commit d0e3a885b ).
20332033 *
20342034 * ⚠️ Deliberately NOT filtered by `physicalColumns`, unlike `expectedIndexes`:
20352035 * its caller runs BEFORE the columns exist — deciding a column's TYPE is the
@@ -2275,15 +2275,15 @@ function indexSignature(
22752275 * Answerable from the index alone, by NAME: the shadow is derived from the
22762276 * index name ({@link hashShadowColumnFor}), so a carrier is an index whose sole
22772277 * key column is its own shadow. That is what makes this the FAIL-SAFE half of
2278- * #13015 — it holds even when the generation expression cannot be read, and a
2278+ * commit cd1348802 — it holds even when the generation expression cannot be read, and a
22792279 * carrier is never a thing this differ may propose destroying on a guess.
22802280 */
22812281export function isHashShadowCarrier ( index : PhysicalIndex ) : boolean {
22822282 return index . columns . length === 1 && index . columns [ 0 ] === hashShadowColumnFor ( index . name ) ;
22832283}
22842284
22852285/**
2286- * The key an index ENFORCES, which is not always the key it STORES (#13015 ).
2286+ * The key an index ENFORCES, which is not always the key it STORES (commit cd1348802 ).
22872287 *
22882288 * For an ordinary index the two are the same. For a #11627 shadow-carried
22892289 * UNIQUE the stored key is one VARBINARY(32) generated column and the enforced
@@ -2358,7 +2358,7 @@ export function diffManagedIndexes(args: {
23582358 if ( ! p || p . primary || isRuntimeManagedIndex ( p , runtimeCreated , tenantField ) ) return false ;
23592359 if ( ! p . unique || p . partial === true ) return false ;
23602360 if ( ( p . expressions ?. length ?? 0 ) > 0 || ( p . nullSafeColumns ?. length ?? 0 ) > 0 ) return false ;
2361- // #13015 : nor is a hash-shadow carrier. Its stored key is one generated
2361+ // Commit cd1348802 : nor is a hash-shadow carrier. Its stored key is one generated
23622362 // column, so the identity comparison below already excludes it — stated
23632363 // outright because the exclusion must survive that comparison changing,
23642364 // and because `replace_unique_index` DROPS the legacy name.
@@ -2428,7 +2428,7 @@ export function diffManagedIndexes(args: {
24282428 // Same normalization on BOTH sides (#4884, ADR-0120 D3): column identity
24292429 // AND key-part form, literal-agnostic on the COALESCE literal — asked of
24302430 // the key the index ENFORCES, which for a #11627 shadow-carried UNIQUE is
2431- // not the column it stores (#13015 ).
2431+ // not the column it stores (commit cd1348802 ).
24322432 const pk = enforcedIndexKey ( p ) ;
24332433 if (
24342434 p . unique === e . unique &&
@@ -2445,7 +2445,7 @@ export function diffManagedIndexes(args: {
24452445 // (`recreate_index` → drop first) this differ cannot undo. Not ours to
24462446 // reconcile (#4884).
24472447 if ( isRuntimeManagedIndex ( p , runtimeCreated , tenantField ) ) continue ;
2448- // #13015 , fail-safe half: a hash-shadow carrier whose generation
2448+ // Commit cd1348802 , fail-safe half: a hash-shadow carrier whose generation
24492449 // expression could NOT be read (`shadowKey` unresolved). We know by name
24502450 // that the index is driver-owned and that its stored key is a digest, so
24512451 // the identity comparison above is meaningless for it — but we do not know
@@ -2455,7 +2455,7 @@ export function diffManagedIndexes(args: {
24552455 // ⛔ The `!p.shadowKey` half is load-bearing, and was measured: without it
24562456 // this guard swallows the RESOLVED carriers too, which silently demotes the
24572457 // whole fix to the blind skip — every shadow-carried index unreportable,
2458- // including a pre-#12998 one hashing the RAW columns whose constraint does
2458+ // including one from before commit df1c75c4b hashing the RAW columns whose constraint does
24592459 // not cover NULL-organization rows at all. Green, quiet, and the exact
24602460 // trade this fix exists to refuse.
24612461 if ( isHashShadowCarrier ( p ) && ! p . shadowKey ) continue ;
@@ -2471,7 +2471,7 @@ export function diffManagedIndexes(args: {
24712471 // clean → recategorised `safe` (dev autoMigrate may apply); duplicates →
24722472 // blocked with a row report, the old index left in place.
24732473 //
2474- // #13015 : read through the ENFORCED key, so a pre-#12998 shadow — same
2474+ // Commit cd1348802 : read through the ENFORCED key, so a shadow from before commit df1c75c4b — same
24752475 // columns, hashed RAW instead of through the NULL-safe COALESCE — is
24762476 // recognised as exactly this tightening and gets the same duplicate
24772477 // pre-flight before anything is dropped. The explicit "physical side is
@@ -2530,7 +2530,7 @@ export function diffManagedIndexes(args: {
25302530 // (#4884 — the boot advised dropping `idx_sys_metadata_overlay_draft`, the
25312531 // partial UNIQUE enforcing draft-overlay uniqueness, on a healthy fresh DB).
25322532 if ( isRuntimeManagedIndex ( p , runtimeCreated , tenantField ) ) continue ;
2533- // #13015 : an orphaned shadow carrier is still an orphan — its declaration
2533+ // Commit cd1348802 : an orphaned shadow carrier is still an orphan — its declaration
25342534 // is gone, and `drop_index` is the right remedy — but the report must name
25352535 // the constraint it enforced, not the digest column it stored.
25362536 const po = enforcedIndexKey ( p ) ;
0 commit comments