<commit_before>-- v0

CREATE TABLE `gping` (
  `id` char(12) DEFAULT NULL,
  `t` datetime DEFAULT NULL,
  `voltage` float DEFAULT NULL,
  `ver` int(11) DEFAULT NULL,
  `bat_status` char(1) DEFAULT NULL,
  `bat_charge` char(1) DEFAULT NULL,
  `bat_percent` float DEFAULT NULL,
  `odbs` text,
  `uptime_phone` int(11) DEFAULT NULL,
  `uptime_app` int(11) DEFAULT NULL,
  `fleetid` varchar(12) DEFAULT NULL,
  `account` varchar(128) DEFAULT NULL,
  `aid` varchar(20) DEFAULT NULL,
  `locked` char(1) DEFAULT NULL,
  KEY `gpi` (`id`,`t`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `gping_nloc` (
  `id` char(12) DEFAULT NULL,
  `t` datetime DEFAULT NULL,
  `lng` decimal(11,8) DEFAULT NULL,
  `lat` decimal(11,8) DEFAULT NULL,
  `time` datetime DEFAULT NULL,
  `accuracy` float DEFAULT NULL,
  KEY `gpi` (`id`,`t`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `gping_gloc` (
  `id` char(12) DEFAULT NULL,
  `t` datetime DEFAULT NULL,
  `lng` decimal(11,8) DEFAULT NULL,
  `lat` decimal(11,8) DEFAULT NULL,
  `time` datetime DEFAULT NULL,
  `accuracy` float DEFAULT NULL,
  KEY `gpi` (`id`,`t`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- v1

CREATE TABLE `login_data` (
  `id` BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  `email` CHAR(128) NOT NULL UNIQUE KEY,
  `password` CHAR(126) NOT NULL UNIQUE KEY
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `user_devices` (
  `device_id` CHAR(12) PRIMARY KEY,
  `user_id` BIGINT UNSIGNED NOT NULL REFERENCES `login_data`(`id`) MATCH SIMPLE,
  `device_type_id` INT NOT NULL REFERENCES `device_type`(`device_type_id`) MATCH SIMPLE,
  `group_id` VARCHAR(256) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `device_type` (
  `device_type_id` INT PRIMARY KEY,
  `name` VARCHAR(128) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `device_type`(`device_type_id`, `name`) VALUES
  (1, 'Vehicle');<commit_msg>[minor] keep device type lower case<commit_after>-- v0

CREATE TABLE `gping` (
  `id` char(12) DEFAULT NULL,
  `t` datetime DEFAULT NULL,
  `voltage` float DEFAULT NULL,
  `ver` int(11) DEFAULT NULL,
  `bat_status` char(1) DEFAULT NULL,
  `bat_charge` char(1) DEFAULT NULL,
  `bat_percent` float DEFAULT NULL,
  `odbs` text,
  `uptime_phone` int(11) DEFAULT NULL,
  `uptime_app` int(11) DEFAULT NULL,
  `fleetid` varchar(12) DEFAULT NULL,
  `account` varchar(128) DEFAULT NULL,
  `aid` varchar(20) DEFAULT NULL,
  `locked` char(1) DEFAULT NULL,
  KEY `gpi` (`id`,`t`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `gping_nloc` (
  `id` char(12) DEFAULT NULL,
  `t` datetime DEFAULT NULL,
  `lng` decimal(11,8) DEFAULT NULL,
  `lat` decimal(11,8) DEFAULT NULL,
  `time` datetime DEFAULT NULL,
  `accuracy` float DEFAULT NULL,
  KEY `gpi` (`id`,`t`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

CREATE TABLE `gping_gloc` (
  `id` char(12) DEFAULT NULL,
  `t` datetime DEFAULT NULL,
  `lng` decimal(11,8) DEFAULT NULL,
  `lat` decimal(11,8) DEFAULT NULL,
  `time` datetime DEFAULT NULL,
  `accuracy` float DEFAULT NULL,
  KEY `gpi` (`id`,`t`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- v1

CREATE TABLE `login_data` (
  `id` BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  `email` CHAR(128) NOT NULL UNIQUE KEY,
  `password` CHAR(126) NOT NULL UNIQUE KEY
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `user_devices` (
  `device_id` CHAR(12) PRIMARY KEY,
  `user_id` BIGINT UNSIGNED NOT NULL REFERENCES `login_data`(`id`) MATCH SIMPLE,
  `device_type_id` INT NOT NULL REFERENCES `device_type`(`device_type_id`) MATCH SIMPLE,
  `group_id` VARCHAR(256) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `device_type` (
  `device_type_id` INT PRIMARY KEY,
  `name` VARCHAR(128) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `device_type`(`device_type_id`, `name`) VALUES
  (1, 'vehicle');
{'fraction_non_alphanumeric': 0.13249211356466878, 'fraction_numerical': 0.02996845425867508, 'mean_word_length': 5.078274760383387, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3043502', 'n_tokens_mistral': 1551, 'n_tokens_neox': 1424, 'n_words': 420}