phpBB

Development Wiki

Difference between revisions of "Table.phpbb topics track"

From phpBB Development Wiki

m
Line 13: Line 13:
 
| primary key
 
| primary key
 
| not null, unique
 
| not null, unique
| FOREIGN KEY, REFERENCES '[[Tables/phpbb_users|phpbb_users]]'
+
| {{fk|users|user_id}}
 
|-
 
|-
 
| topic_id
 
| topic_id
Line 19: Line 19:
 
| primary key
 
| primary key
 
| not null, unique
 
| not null, unique
| FOREIGN KEY, REFERENCES '[[Tables/phpbb_topics|phpbb_topics]]'
+
| {{fk|topics|topic_id}}
 
|-
 
|-
 
| forum_id
 
| forum_id
Line 25: Line 25:
 
| tbd
 
| tbd
 
| not null
 
| not null
| FOREIGN KEY, REFERENCES '[[Tables/phpbb_forums|phpbb_forums]]'
+
| {{fk|forums|forum_id}}
 
|-
 
|-
 
| mark_time
 
| mark_time

Revision as of 02:33, 7 March 2011

This table keeps record for visited topics in order to mark them as read or unread. We use the mark_time timestamp in conjunction with last post of topic x's timestamp to know if topic x is read or not.

Fields

column type (MySQL) content default comment
user_id mediumint(8) unsigned primary key not null, unique

references phpbb_users.user_id

topic_id mediumint(8) unsigned primary key not null, unique

references phpbb_topics.topic_id

forum_id mediumint(8) unsigned tbd not null

references phpbb_forums.forum_id

mark_time int(11) unsigned tbd 0 Last visit to this topic (timestamp)

Keys

name fields
PRIMARY user_id
topic_id
forum_id forum_id