MWX/SpamFerret/tables/sessions: Difference between revisions
< MWX | SpamFerret | tables
Jump to navigation
Jump to search
m (3 revisions imported: moving here) |
m (Woozle moved page SpamFerret/tables/sessions to MWX/SpamFerret/tables/sessions without leaving a redirect: most mediawiki extensions belong under MWX now) |
(No difference)
|
Latest revision as of 20:14, 1 May 2022
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>