SpamFerret/tables/sessions

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to: navigation, search

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>