@@ -145,15 +145,26 @@ describe('unkeyable TEXT column: the upgrade path names the real remedy (#12999)
145145 // The remedy, in full. Each clause is separately load-bearing: an operator
146146 // who converts the column without restating NOT NULL / DEFAULT on MySQL
147147 // ends up WORSE off than the no-op, having silently dropped the default.
148- expect ( message ) . toMatch ( / b a c k u p t a k e n f i r s t / ) ;
149- expect ( message ) . toMatch ( / r e s t a t i n g t h e F U L L c o l u m n d e f i n i t i o n o n M y S Q L / ) ;
150- expect ( message ) . toMatch ( / M O D I F Y d r o p s a N O T N U L L o r D E F A U L T y o u d o n o t r e p e a t / ) ;
148+ // The remedy is the migration door, whose apply arm restates the whole
149+ // column definition from the catalog, so the message names that door and
150+ // what it keeps.
151+ expect ( message ) . toMatch ( / r u n " o s m i g r a t e p l a n " , t h e n " o s m i g r a t e a p p l y " / ) ;
152+ expect ( message ) . toMatch ( / k e e p i n g N O T N U L L a n d D E F A U L T / ) ;
153+ expect ( message ) . toMatch ( / r e f u s e s w i t h t h e r o w s n a m e d / ) ;
151154 expect ( message ) . toContain ( 'varchar(64)' ) ;
152- expect ( message ) . toMatch ( / n e x t b o o t c r e a t e t h i s i n d e x / ) ;
153-
154- // ⛔ And it does NOT quietly become an instruction the driver will carry out
155- // itself: the rewrite needs an exclusive metadata lock, so it stays manual.
156- expect ( message ) . toMatch ( / d o e s N O T r e w r i t e t h e c o l u m n f o r y o u / ) ;
155+ expect ( message ) . toMatch ( / n e x t b o o t t h e n c r e a t e s t h i s i n d e x / ) ;
156+
157+ // ⛔ And no manual path is left in it: the operator is not handed a
158+ // hand-written MODIFY, the statement that drops a NOT NULL or DEFAULT it
159+ // does not repeat. A manual path reintroduced here must bring back its
160+ // backup-first and restate-everything guidance, and this pin says so.
161+ expect ( message ) . not . toMatch ( / A L T E R T A B L E / i) ;
162+ expect ( message ) . not . toMatch ( / \b M O D I F Y \b / i) ;
163+ expect ( message ) . not . toMatch ( / b y h a n d / i) ;
164+
165+ // ⛔ The plain boot sync still does not rewrite the column itself: the
166+ // rewrite needs an exclusive metadata lock, so it runs at the migration door.
167+ expect ( message ) . toMatch ( / p l a i n b o o t s y n c d o e s n o t c o n v e r t t h e c o l u m n i t s e l f / ) ;
157168 expect ( message ) . toMatch ( / e x c l u s i v e m e t a d a t a l o c k / ) ;
158169
159170 // ⛔ The CREATE-path advice must be GONE from this message — its presence is
@@ -236,7 +247,7 @@ describe('unkeyable TEXT column: the upgrade path names the real remedy (#12999)
236247
237248 // The stale half gets the conversion remedy…
238249 expect ( message ) . toMatch ( / " s l u g " \( d e c l a r e s ` m a x L e n g t h : 6 4 ` \) / ) ;
239- expect ( message ) . toMatch ( / r e s t a t i n g t h e F U L L c o l u m n d e f i n i t i o n o n M y S Q L / ) ;
250+ expect ( message ) . toMatch ( / " o s m i g r a t e a p p l y " : i t c o n v e r t s t h e c o l u m n \( s \) t o v a r c h a r \( n \) , k e e p i n g N O T N U L L a n d D E F A U L T / ) ;
240251 // …and the genuinely unbounded half is still told to declare a bound, so a
241252 // composite key does not send the operator down one route for both columns.
242253 expect ( message ) . toMatch ( / C o l u m n \( s \) " n o t e " i n t h e s a m e k e y d e c l a r e n o u s a b l e b o u n d a n d D O n e e d ` m a x L e n g t h ` / ) ;
0 commit comments