# NULL first\_visited\_at dates in the topic\_users table

**URL:** https://meta.discourse.org/t/null-first-visited-at-dates-in-the-topic-users-table/45996
**Category:** Development
**Created:** [June 18, 2016, 9:17am UTC](https://meta.discourse.org/t/null-first-visited-at-dates-in-the-topic-users-table/45996 "2016-06-18T09:17:15Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [June 19, 2016, 1:09am UTC](https://meta.discourse.org/t/null-first-visited-at-dates-in-the-topic-users-table/45996/2 "2016-06-19T01:09:49Z")

</div>

Issues around `last_visited_at` also reported / detailed here:

> [@Is \`topic\_users.last\_visited\_at\` supposed to be updated on every visit?](https://meta.discourse.org/t/is-topic-users-last-visited-at-supposed-to-be-updated-on-every-visit/42164/):
>
> Am I completely misunderstanding entirely what these values are for? I’ve been using [Data Explorer](https://meta.discourse.org/t/32566?silent=true) to review activity and noted that topic\_users.last\_visited\_at didn’t seem to be updating / showing topics I have recently visited. Is topic\_users.last\_visited\_at supposed to be updated on every visit to a topic? Here is the Query I was using with [Data Explorer](https://meta.discourse.org/t/32566?silent=true). -- [params] -- int :user\_id = 1 SELECT topic\_id, last\_visited\_at, first\_visited\_at from topic\_users WHERE user\_id = :u…

Specifically on April 7th I concluded the table is not updated correctly.  
I’m unsure if there have been any code updates in this area since.

I didn’t report it in the #Contribute > Bug category because there is nowhere in Discourse code base where this was an actual “problem”…  
… however data is stored in an inconsistent manor for other plugins and custom users reports to be ran against.

---

_[View the full topic](https://meta.discourse.org/t/null-first-visited-at-dates-in-the-topic-users-table/45996)._
