Ferreteria/v0.5/sql/user client: Difference between revisions

From Woozle Writes Code
< Ferreteria‎ | v0.5‎ | sql
Jump to navigation Jump to search
m (Woozle moved page Ferreteria/v0.5/login/data/client to Ferreteria/v0.5/sql/user client: where it belongs)
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{fmt/title|Ferreteria: <code>user_client</code> table}}
==About==
* '''system''': {{l/ver|login}}
==Purpose==
This table is mainly for storing information about a particular client-fingerprint so we can record that information for every Session without having to include it in every Session record. It's not intended to uniquely identify a particular client-device; that is done by the {{l/same|user_session}} table.
==SQL==
==SQL==
<syntaxhighlight lang=mysql>
<syntaxhighlight lang=mysql>

Latest revision as of 20:33, 13 February 2023

Ferreteria: user_client table

About

Purpose

This table is mainly for storing information about a particular client-fingerprint so we can record that information for every Session without having to include it in every Session record. It's not intended to uniquely identify a particular client-device; that is done by the user_session table.

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;