Open sbulen opened 3 years ago
Should we allow mediumtext to text then if a truncation would occur? Even with a warning, its a very dangerous option and there is no recovery from this. Data will be lost.
If we do allow it, I think the message needs appended info indicating data will be truncated and is not recoverable without a working backup.
We could add more alarming text, for sure.
We could also remove it entirely. I think in nearly all cases, folks are going from TEXT to MEDIUMTEXT, not the other way around. In this example, user was testing behavior & alternating between TEXT vs MEDIUMTEXT, not actually moving their db back to TEXT.
We could also remove it entirely. I think in nearly all cases, folks are going from TEXT to MEDIUMTEXT, not the other way around. In this example, user was testing behavior & alternating between TEXT vs MEDIUMTEXT, not actually moving their db back to TEXT.
This seems like the best plan to me. Downgrading from MEDIUMTEXT to TEXT doesn't seem like something an admin would normally want to do in a production environment. If the admin needed to upgrade from TEXT to MEDIUMTEXT in the first place, they are unlikely to want to go back.
Description
The Forum Maintenance function to convert from MEDIUMTEXT to TEXT claims it will truncate values in order to complete:
But it doesn't, instead, it errors out:
I think this is a byproduct of converting SMF to strict mode. Without strict mode, it will truncate. It needs to explicitly truncate now.
Steps to reproduce
Environment (complete as necessary)
Additional information/references
Reported on forum here: https://www.simplemachines.org/community/index.php?topic=577205.msg4089531#msg4089531