Ferreteria/v0.5/sql/user client: Difference between revisions
< Ferreteria | v0.5 | sql
Jump to navigation
Jump to search
(Created page with "==SQL== <syntaxhighlight lang=mysql> CREATE TABLE `user_client` ( `ID` int NOT NULL AUTO_INCREMENT, `CRC` int unsigned NOT NULL...") |
(→SQL) |
||
Line 12: | Line 12: | ||
PRIMARY KEY (`ID`), | PRIMARY KEY (`ID`), | ||
UNIQUE KEY `CRC` (`CRC`) | UNIQUE KEY `CRC` (`CRC`) | ||
) ENGINE=InnoDB | ) ENGINE=InnoDB; | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 15:25, 31 January 2022
SQL
CREATE TABLE `user_client` (
`ID` int NOT NULL AUTO_INCREMENT,
`CRC` int unsigned NOT NULL COMMENT 'crc32(Address+Browser) - unique integer defined by client specs',
`Address` varchar(63) CHARACTER SET utf8 NOT NULL COMMENT 'IP address of client',
`Domain` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Domain name of client',
`Browser` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Browser USER_AGENT string',
`WhenFirst` datetime NOT NULL COMMENT 'When this client was first seen',
`WhenFinal` datetime DEFAULT NULL COMMENT 'When this client was most recently seen',
PRIMARY KEY (`ID`),
UNIQUE KEY `CRC` (`CRC`)
) ENGINE=InnoDB;