MWX/SpamFerret/tables/sessions: Difference between revisions
< MWX | SpamFerret | tables
Jump to navigation
Jump to search
m (engine) |
(status; notes) |
||
Line 1: | Line 1: | ||
==About== | |||
* '''Status''': NOT NEEDED | |||
===Notes=== | |||
I added the <u>sessions</u> table when I thought the MediaWiki software wasn't recording IP addresses anywhere, but then it turns out that the IP address and username is stored in recentchanges for each edit (user ID = rc_user, user name = rc_user_text, IP address = rc_ip). It may turn out to be easier to use <u>sessions</u> for reports and such (can you do a JOIN across databases?), but for now it isn't actually used. | |||
If I ''were'' going to use it, I'd probably revise the other tables to point to it instead of recording user info locally. | |||
==SQL== | ==SQL== | ||
<mysql>CREATE TABLE `sessions` ( | <mysql>CREATE TABLE `sessions` ( |
Revision as of 19:28, 5 August 2009
About
- Status: NOT NEEDED
Notes
I added the sessions table when I thought the MediaWiki software wasn't recording IP addresses anywhere, but then it turns out that the IP address and username is stored in recentchanges for each edit (user ID = rc_user, user name = rc_user_text, IP address = rc_ip). It may turn out to be easier to use sessions for reports and such (can you do a JOIN across databases?), but for now it isn't actually used.
If I were going to use it, I'd probably revise the other tables to point to it instead of recording user info locally.
SQL
<mysql>CREATE TABLE `sessions` (
`ID` INT NOT NULL AUTO_INCREMENT, `Address` varchar(15) COMMENT "IP address", `Username` varchar(255) COMMENT "username", `Browser` varchar(255) NOT NULL COMMENT "browser client string", `ID_User` INT DEFAULT NULL COMMENT "MediaWiki user.user_id", `PageServer` varchar(63) NOT NULL COMMENT "identifier of site logged in to (usually domain)", `WhenStart` DATETIME NOT NULL COMMENT "when this session began (login)", `WhenFinish` DATETIME DEFAULT NULL COMMENT "when this session ended (logout, if any)", PRIMARY KEY(`ID`)
) ENGINE = MYISAM;</mysql>