ChatterPy
ChatterPy copied to clipboard
Extend text length in statement table
Related to #2
Extend the column length for 'text' and 'search_text' in the 'statement' table to 1000 characters.
-
Abstract Models:
- Update the
max_lengthattribute of thetextandsearch_textfields in theAbstractBaseStatementclass to 1000 characters. - Add indexes to frequently queried fields in the
AbstractBaseStatementclass to improve query performance. - Add a custom validation method in the
AbstractBaseStatementclass to ensure data integrity and consistency.
- Update the
-
Migration:
- Add a new migration file
0019_extend_text_length.pyto update the column length fortextandsearch_textin thestatementtable to 1000 characters. - Use the
RunSQLoperation instead ofAlterFieldfor efficiency.
- Add a new migration file
-
Constants:
- Update
STATEMENT_TEXT_MAX_LENGTHinconstants.pyto 1000 to reflect the new maximum length for thetextandsearch_textfields. - Add more detailed comments explaining the purpose and usage of each constant.
- Update
For more details, open the Copilot Workspace session.