10

I have a custom field for some body text, but the content for one particular entry is so long that it gets chopped off, presumably because of the MySQL limit for columns of type TEXT.

I absolutely loathe pagination so that's not an option.

Would it be safe to simply switch the column's type to something like MEDIUMTEXT? It's a large site with thousands of entries so a bit nervous of messing around in the database.

Any other options?

James

13

You can change the fieldtype to MEDIUMTEXT or LONGTEXT and it will work fine for your needs. But you need to be aware that that change will not be supported by EE and that future EE updates may alter the schema and of course could reset the fieldtype to TEXT.

Reference - http://expressionengine.com/forums/viewthread/211174/

| improve this answer | |
  • oof yeh that's a great point. The annoying part is that if it gets cut off on upgrading (and it will since this is an EE1 site), it's likely that no-one will notice for a while and half the entry will be lost. Hmm. – James Smith Nov 24 '12 at 14:11
  • 3
    I doubt an EE upgrade would ever alter the column type of your channel data. But that's why you always take backups before upgrading :) – Adrian Macneil Nov 24 '12 at 14:25
  • Yeah, I cannot imagine that any EE upgrade would ever alter the fieldtype of channel data fields. That would be very strange and complicated for them to do. – adrienne Nov 24 '12 at 16:09
  • 2
    @adrienne Of course one cannot imagine such a scenario, but we have to take precaution against it all the same as there are no guarantees! – JohnWBaxter Nov 24 '12 at 16:15
  • @John Well, of course. But precaution, in this case, means "make a backup", not "don't do it". – adrienne Nov 24 '12 at 16:53
6

Change the field type to LONGTEXT to give yourself lots of room to grow with that field.

LONGTEXT will store 4,294,967,295 bytes of data which is approximately ~4GB. Should be plenty.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.