mikebridge commented on PR #39859:
URL: https://github.com/apache/superset/pull/39859#issuecomment-4500087731

   @justinpark Sorry, yes, indeed, it looks like mysql generates this error 
only when a table is populated, but it doesn't enforce the rule when it's empty 
🤷‍♂️---hence the passing test.
   
   Instead of dropping FKs on MySQL for all 8 tables (which would also require 
explicitly re-creating them for the 6 non-recreate tables since they don't go 
through the copy_from path), I moved the `alter_column nullable=False` into an 
`_enforce_not_null_for_sqlite()` helper that only runs on **SQLite** — where 
it's structurally required (composite PK doesn't promote columns to NOT NULL 
there). It's a no-op on Postgres (which auto-promotes) and skipped on MySQL 
(where the alter would hit 1832 even though the promotion has already happened 
implicitly). 
   
   This should now be verified end-to-end: downgrade-then-upgrade against MySQL 
with ~12M total junction rows seeded completes in 1m 39s with no 1832. The 44 
in-memory SQLite tests still pass. Thanks again for the careful repro!
   
   ... rerunning ci now


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to