Hi,
According to the documentation, TextField should use MySQL longtext column type but it uses the text column type. Is this the desired behavior and the documentation has not been changed? If so, how can I change my code to make sure it uses a longtext and not a text field type?
Apologies -- the docs are incorrect. Peewee used "longtext" up until 3.x, at which point it changed to just plain old "text".
To have a longtext field:
class LongTextField(TextField):
field_type = 'LONGTEXT'
Then just use it as you would a regular TextField.
Most helpful comment
Apologies -- the docs are incorrect. Peewee used "longtext" up until 3.x, at which point it changed to just plain old "text".
To have a longtext field:
Then just use it as you would a regular
TextField.