Currently, a bookmark will be associated with a text_id, which points to the Text table, that contains a context and an article_id. Currently, this association is not enforced by a FK constraint, and lead to some errors when a bookmark no longer can find the article_id associated to it. (This was quite rare).
However, further reflection lead us to discuss that instead of associating the text with the article, we should instead associate the bookmark with an article_id, which will then have the span (Text) it appears on. This would allow us in the future to maybe have different types of contexts where the word can be found (e.g. video, photo by the user) which would be a context_id, with a particular span.
Currently, a bookmark will be associated with a text_id, which points to the Text table, that contains a context and an article_id. Currently, this association is not enforced by a FK constraint, and lead to some errors when a bookmark no longer can find the article_id associated to it. (This was quite rare).
However, further reflection lead us to discuss that instead of associating the text with the article, we should instead associate the bookmark with an article_id, which will then have the span (Text) it appears on. This would allow us in the future to maybe have different types of contexts where the word can be found (e.g. video, photo by the user) which would be a context_id, with a particular span.