Currently latest composed titles texts are stored as Markdown-formatted fields within the GroupChat model. That was okay before the given titles records were implemented. Now it's both a rigid design approach and a redundant data in the database. Both fields are better to be replaced with single nullable integer last_given_titles_count field where value of NULL means no participants were found and 0 stands for empty title pools.
Rewrite assigned titles texts creation to use given title records
Add migrations
Cache formatted texts?
Test it
Polish
Currently latest composed titles texts are stored as Markdown-formatted fields within the `GroupChat` model. That was okay before the given titles records were implemented. Now it's both a rigid design approach and a redundant data in the database. Both fields are better to be replaced with single nullable integer `last_given_titles_count` field where value of `NULL` means no participants were found and `0` stands for empty title pools.
- [x] Rewrite assigned titles texts creation to use given title records
- [x] Add migrations
- [ ] Cache formatted texts?
- [x] Test it
- [ ] Polish
Currently latest composed titles texts are stored as Markdown-formatted fields within the
GroupChatmodel. That was okay before the given titles records were implemented. Now it's both a rigid design approach and a redundant data in the database. Both fields are better to be replaced with single nullable integerlast_given_titles_countfield where value ofNULLmeans no participants were found and0stands for empty title pools.