<commit_before>CREATE TABLE players (
  steam_id BIGINT,
  name TEXT,
  model TEXT,
  PRIMARY KEY (steam_id)
);

CREATE TABLE gametypes (
  gametype_id SMALLINT,
  gametype_name TEXT,
  gametype_short TEXT,
  PRIMARY KEY (gametype_id)
);

INSERT INTO gametypes (gametype_id, gametype_name, gametype_short) VALUES
  (1, 'Attack & Defend',  'ad'),
  (2, 'Capture the Flag', 'ctf'),
  (3, 'Team Deathmatch',  'tdm');

CREATE TABLE weapons (
  weapon_id SMALLINT,
  weapon_name TEXT,
  weapon_short TEXT,
  PRIMARY KEY (weapon_id)
);

INSERT INTO weapons (weapon_id, weapon_name, weapon_short) VALUES
  (1, 'Gauntlet',         'gt'),
  (2, 'Machine Gun',      'mg'),
  (3, 'Shotgun',          'sg'),
  (4, 'Grenade Launcher', 'gl'),
  (5, 'Rocket Launcher',  'rl'),
  (6, 'Lightning Gun',    'lg'),
  (7, 'Railgun',          'rg'),
  (8, 'Plasma Gun',       'pg'),
  (9, 'Heavy Machine Gun','hmg');

CREATE TABLE medals (
  medal_id SMALLINT,
  medal_name TEXT,
  medal_short TEXT,
  PRIMARY KEY (medal_id)
);

INSERT INTO medals (medal_id, medal_name, medal_short) VALUES
  (1, 'Accuracy',     'accuracy'),
  (2, 'Assists',      'assists'),
  (3, 'Captures',     'captures'),
  (4, 'Combokill',    'combokill'),
  (5, 'Defends',      'defends'),
  (6, 'Excellent',    'excellent'),
  (7, 'First Frag',   'firstfrag'),
  (8, 'Headshot',     'headshot'),
  (9, 'Humiliation',  'humiliation'),
  (10,'Impressive',   'impressive'),
  (11,'Midair',       'midair'),
  (12,'Perfect',      'perfect'),
  (13,'Perforated',   'perforated'),
  (14,'Quad God',     'quadgod'),
  (15,'Rampage',      'rampage'),
  (16,'Revenge',      'revenge');

CREATE TABLE gametype_ratings (
  steam_id BIGINT,
  gametype_id SMALLINT,
  rating REAL,
  FOREIGN KEY (steam_id)    REFERENCES players(steam_id),
  FOREIGN KEY (gametype_id) REFERENCES gametypes(gametype_id),
  PRIMARY KEY (steam_id, gametype_id)
);

CREATE TABLE factories (
  factory_id SMALLINT,
  factory_short TEXT,
  PRIMARY KEY (factory_id)
);

CREATE SEQUENCE factory_seq START 1;

CREATE TABLE maps (
  map_id SMALLINT,
  map_name TEXT,
  PRIMARY KEY (map_id)
);

CREATE SEQUENCE map_seq START 1;<commit_msg>added games_count column (as n)<commit_after>CREATE TABLE players (
  steam_id BIGINT,
  name TEXT,
  model TEXT,
  PRIMARY KEY (steam_id)
);

CREATE TABLE gametypes (
  gametype_id SMALLINT,
  gametype_name TEXT,
  gametype_short TEXT,
  PRIMARY KEY (gametype_id)
);

INSERT INTO gametypes (gametype_id, gametype_name, gametype_short) VALUES
  (1, 'Attack & Defend',  'ad'),
  (2, 'Capture the Flag', 'ctf'),
  (3, 'Team Deathmatch',  'tdm');

CREATE TABLE weapons (
  weapon_id SMALLINT,
  weapon_name TEXT,
  weapon_short TEXT,
  PRIMARY KEY (weapon_id)
);

INSERT INTO weapons (weapon_id, weapon_name, weapon_short) VALUES
  (1, 'Gauntlet',         'gt'),
  (2, 'Machine Gun',      'mg'),
  (3, 'Shotgun',          'sg'),
  (4, 'Grenade Launcher', 'gl'),
  (5, 'Rocket Launcher',  'rl'),
  (6, 'Lightning Gun',    'lg'),
  (7, 'Railgun',          'rg'),
  (8, 'Plasma Gun',       'pg'),
  (9, 'Heavy Machine Gun','hmg');

CREATE TABLE medals (
  medal_id SMALLINT,
  medal_name TEXT,
  medal_short TEXT,
  PRIMARY KEY (medal_id)
);

INSERT INTO medals (medal_id, medal_name, medal_short) VALUES
  (1, 'Accuracy',     'accuracy'),
  (2, 'Assists',      'assists'),
  (3, 'Captures',     'captures'),
  (4, 'Combokill',    'combokill'),
  (5, 'Defends',      'defends'),
  (6, 'Excellent',    'excellent'),
  (7, 'First Frag',   'firstfrag'),
  (8, 'Headshot',     'headshot'),
  (9, 'Humiliation',  'humiliation'),
  (10,'Impressive',   'impressive'),
  (11,'Midair',       'midair'),
  (12,'Perfect',      'perfect'),
  (13,'Perforated',   'perforated'),
  (14,'Quad God',     'quadgod'),
  (15,'Rampage',      'rampage'),
  (16,'Revenge',      'revenge');

CREATE TABLE gametype_ratings (
  steam_id BIGINT,
  gametype_id SMALLINT,
  rating REAL,
  n BIGINT DEFAULT 0,
  FOREIGN KEY (steam_id)    REFERENCES players(steam_id),
  FOREIGN KEY (gametype_id) REFERENCES gametypes(gametype_id),
  PRIMARY KEY (steam_id, gametype_id)
);

CREATE TABLE factories (
  factory_id SMALLINT,
  factory_short TEXT,
  PRIMARY KEY (factory_id)
);

CREATE SEQUENCE factory_seq START 1;

CREATE TABLE maps (
  map_id SMALLINT,
  map_name TEXT,
  PRIMARY KEY (map_id)
);

CREATE SEQUENCE map_seq START 1;
{'fraction_non_alphanumeric': 0.15499769691386459, 'fraction_numerical': 0.017273146015660986, 'mean_word_length': 3.7257889009793255, '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': '3042495', 'n_tokens_mistral': 1791, 'n_tokens_neox': 1676, 'n_words': 429}