fix(mysql): allow DEFAULT values for TEXT columns#2063
fix(mysql): allow DEFAULT values for TEXT columns#2063hevengo wants to merge 2 commits intopropelorm:masterfrom
Conversation
…d MariaDB 10.2.1+ Remove the EngineException that blocked DEFAULT values for TEXT columns while keeping it for BLOB types. Update the reverse schema parser to preserve TEXT default values during introspection, with handling for MariaDB's extra single-quote wrapping on TEXT defaults.
|
Very nice! Spotless too (though unconventional boundary characters in regex always trip me up). The state of Propel2 test suite hides it well, but the added test in MysqlSchemaParserTest currently fails: (see run output) Once this is figured out, I'd be happy to add this to Perpl if you don't mind? |
…er test Update MysqlSchemaParser regex to strip MySQL 8.0+ charset prefixes (e.g. _utf8mb3'value') when parsing TEXT column default values, in addition to MariaDB's extra single-quote wrapping.
|
fixed the said test-case - but tests are still failing in obscure ways |
|
Oh, that is a new issue with Github. Apparently they broke the tool that runs docker containers in actions (see for example issue report in old action repo). @oojacoboo fixed it for Perpl. I checked out the PR and pushed a branch here, but tests are still failing (see run). Tried locally with more slashes ( Let me know if I can be of assistance. |
|
I think I figured it out, the issue is MariaDB encodes the default string once, but MySQL does it twice. Have a look at perplorm#118, does that seem ok? Sorry for butting in, I need to get rid of that branch again. Checkout Perpl, it's still maintained and improved Propel2. Would have been fun to figure this out together! |
allow DEFAULT values for TEXT columns on MySQL 8.0.13+ and MariaDB 10.2.1+
Remove the EngineException that blocked DEFAULT values for TEXT columns while keeping it for BLOB types. Update the reverse schema parser to preserve TEXT default values during introspection, with handling for MariaDB's extra single-quote wrapping on TEXT defaults.