This changes from storing only a single topic visit per user to just storing all of them. I don't intend to keep all of these and will probably find a way to "quantize" repeated visits soon. However, I want to get an idea of the volume first, and also use this to see how the new querying methods work in production. On that note, I'm not sure that the LATERAL outer join is the best method, but it seems interesting (and was kind of a pain in the ass in SQLAlchemy), so we'll see how it looks. As part of this, I also changed the method of adjusting num_comments on past topic visits to be done entirely in triggers, instead of the previous approach of doing it in _increment_topic_comments_seen(). However, this really just made me realize how incorrect this idea is and how many edge cases can come up that will mess up the comment counters on the visits (e.g. post a comment and then delete it immediately). Hopefully this can go away in the somewhat near future with some other changes to notifications.
Tildes
This is the code behind Tildes, a non-profit community site. The official repository is located on GitLab at https://gitlab.com/tildes/tildes
For general information about Tildes and its goals, please see the announcement blog post and the Tildes Docs site.
Issue tracker / plans
Known issues and plans for upcoming changes are tracked on GitLab: https://gitlab.com/tildes/tildes/issues
The "board" view is useful as an overview: https://gitlab.com/tildes/tildes/boards
Contributing to Tildes development
Please see the Contributing doc for more detailed information about setting up a development version of Tildes and how to contribute to development.
License
Copyright (c) 2018 Tildes contributors code@tildes.net
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.