ChatterPy icon indicating copy to clipboard operation
ChatterPy copied to clipboard

Extend text length in statement table

Open outmaneuver opened this issue 1 year ago • 0 comments

Related to #2

Extend the column length for 'text' and 'search_text' in the 'statement' table to 1000 characters.

  • Abstract Models:

    • Update the max_length attribute of the text and search_text fields in the AbstractBaseStatement class to 1000 characters.
    • Add indexes to frequently queried fields in the AbstractBaseStatement class to improve query performance.
    • Add a custom validation method in the AbstractBaseStatement class to ensure data integrity and consistency.
  • Migration:

    • Add a new migration file 0019_extend_text_length.py to update the column length for text and search_text in the statement table to 1000 characters.
    • Use the RunSQL operation instead of AlterField for efficiency.
  • Constants:

    • Update STATEMENT_TEXT_MAX_LENGTH in constants.py to 1000 to reflect the new maximum length for the text and search_text fields.
    • Add more detailed comments explaining the purpose and usage of each constant.

For more details, open the Copilot Workspace session.

outmaneuver avatar Oct 22 '24 21:10 outmaneuver