How can I use LONGTEXT db size with Silverstripe?

Silverstripe Version: 4.10

I need to store raw HTML text with lots of base64 images, but it seems that SS only allows me to store mediumtext in DataObjects. Does anyone know how I can use larger sizes?

I think you’ll need to subclass DBField, (or possibly DBText would be better, since you can then keep all the manipulations which come with it). You can then overwrite the requireField() method to specify longtext instead of mediumtext.

You’d then just specify your field class instead of the usual ‘Text’ in your dataobject definition.

Just as an aside… Mediumtext should be able to store 16MB of data… that’s a lot of storage in the database!