<commit_before>
-- DreamGuild.eu database schema


BEGIN;


CREATE TABLE user (
  id         INTEGER PRIMARY KEY AUTOINCREMENT,
  email      TEXT NOT NULL UNIQUE,
  password   TEXT NOT NULL,

  -- user level
  -- 0: just registered didn't send any app
  -- 5: guild member
  -- 20: gm
  -- 30: admin
  level      INTEGER DEFAULT 0,     -- user level
  main       INTEGER DEFAULT 0,     -- main character id
  appid      INTEGER DEFAULT 0,     -- aplication id
  dkp        INTEGER DEFAULT 0,
  join_time  INTEGER DEFAULT 0,     -- joined date
  last_active INTEGER DEFAULT 0
);


CREATE TABLE roster (
  id         INTEGER PRIMARY KEY AUTOINCREMENT,
  name       TEXT,
  uid        INTEGER DEFAULT 0,
  class      INTEGER DEFAULT 0,
  race       INTEGER DEFAULT 0,
  level      INTEGER DEFAULT 0,
  ailvl      INTEGER DEFAULT 0,
  eilvl      INTEGER DEFAULT 0,
  rank       INTEGER DEFAULT 0,
  thumbnail  TEXT,
  spec       TEXT,
  role       INTEGER DEFAULT 0,
  talents    TEXT,
  items      TEXT,
  progress   TEXT,
  achievement_points INTEGER DEFAULT 0,
  last_update INTEGER DEFAULT 0
);


CREATE TABLE ilvl_history (
  uid        INTEGER DEFAULT 0,
  ilvl       INTEGER DEFAULT 0,
  time       INTEGER DEFAULT 0,
  UNIQUE     (uid, ilvl)
);


CREATE TABLE progress_history (
  uid        INTEGER DEFAULT 0,
  points     INTEGER DEFAULT 0,
  time       INTEGER DEFAULT 0,
  UNIQUE     (uid, points)
);


CREATE TABLE application (
  id         INTEGER PRIMARY KEY AUTOINCREMENT,
  uid        INTEGER DEFAULT 0,
  status     INTEGER DEFAULT 0,
  app_id     TEXT UNIQUE,
  name       TEXT,
  class      INTEGER DEFAULT 0,
  race       INTEGER DEFAULT 0,
  level      INTEGER DEFAULT 0,
  ailvl      INTEGER DEFAULT 0,
  eilvl      INTEGER DEFAULT 0,
  thumbnail  TEXT,
  talents    TEXT,
  items      TEXT,
  progress   TEXT,
  achievement_points INTEGER DEFAULT 0,
  questions  TEXT,
  time       INTEGER DEFAULT 0,
  update_time INTEGER DEFAULT 0,
  yes        INTEGER DEFAULT 0,
  no         INTEGER DEFAULT 0,
  points     INTEGER DEFAULT 0,
  issued_by  INTEGER DEFAULT 0,
  reason     TEXT
);


CREATE TABLE application_votes (
  uid        INTEGER NOT NULL,
  appid      INTEGER NOT NULL,
  vote       INTEGER DEFAULT 0,
  points     INTEGER DEFAULT 0,
  time       INTEGER DEFAULT 0 NOT NULL,
  UNIQUE     (uid, appid)
);


CREATE TABLE application_comments (
  id         INTEGER PRIMARY KEY AUTOINCREMENT,
  appid      INTEGER NOT NULL,
  uid        INTEGER NOT NULL,
  comment    TEXT,
  time       INTEGER DEFAULT 0 NOT NULL
);




-- FACEBOOK FEEDS<commit_msg>add news table<commit_after>
-- DreamGuild.eu database schema


BEGIN;


CREATE TABLE user (
  id         INTEGER PRIMARY KEY AUTOINCREMENT,
  email      TEXT NOT NULL UNIQUE,
  password   TEXT NOT NULL,

  -- user level
  -- 0: just registered didn't send any app
  -- 5: guild member
  -- 20: gm
  -- 30: admin
  level      INTEGER DEFAULT 0,     -- user level
  main       INTEGER DEFAULT 0,     -- main character id
  appid      INTEGER DEFAULT 0,     -- aplication id
  dkp        INTEGER DEFAULT 0,
  join_time  INTEGER DEFAULT 0,     -- joined date
  last_active INTEGER DEFAULT 0
);


CREATE TABLE roster (
  id         INTEGER PRIMARY KEY AUTOINCREMENT,
  name       TEXT,
  uid        INTEGER DEFAULT 0,
  class      INTEGER DEFAULT 0,
  race       INTEGER DEFAULT 0,
  level      INTEGER DEFAULT 0,
  ailvl      INTEGER DEFAULT 0,
  eilvl      INTEGER DEFAULT 0,
  rank       INTEGER DEFAULT 0,
  thumbnail  TEXT,
  spec       TEXT,
  role       INTEGER DEFAULT 0,
  talents    TEXT,
  items      TEXT,
  progress   TEXT,
  achievement_points INTEGER DEFAULT 0,
  last_update INTEGER DEFAULT 0
);


CREATE TABLE ilvl_history (
  uid        INTEGER DEFAULT 0,
  ilvl       INTEGER DEFAULT 0,
  time       INTEGER DEFAULT 0,
  UNIQUE     (uid, ilvl)
);


CREATE TABLE progress_history (
  uid        INTEGER DEFAULT 0,
  points     INTEGER DEFAULT 0,
  time       INTEGER DEFAULT 0,
  UNIQUE     (uid, points)
);


CREATE TABLE application (
  id         INTEGER PRIMARY KEY AUTOINCREMENT,
  uid        INTEGER DEFAULT 0,
  status     INTEGER DEFAULT 0,
  app_id     TEXT UNIQUE,
  name       TEXT,
  class      INTEGER DEFAULT 0,
  race       INTEGER DEFAULT 0,
  level      INTEGER DEFAULT 0,
  ailvl      INTEGER DEFAULT 0,
  eilvl      INTEGER DEFAULT 0,
  thumbnail  TEXT,
  talents    TEXT,
  items      TEXT,
  progress   TEXT,
  achievement_points INTEGER DEFAULT 0,
  questions  TEXT,
  time       INTEGER DEFAULT 0,
  update_time INTEGER DEFAULT 0,
  yes        INTEGER DEFAULT 0,
  no         INTEGER DEFAULT 0,
  points     INTEGER DEFAULT 0,
  issued_by  INTEGER DEFAULT 0,
  reason     TEXT
);


CREATE TABLE application_votes (
  uid        INTEGER NOT NULL,
  appid      INTEGER NOT NULL,
  vote       INTEGER DEFAULT 0,
  points     INTEGER DEFAULT 0,
  time       INTEGER DEFAULT 0 NOT NULL,
  UNIQUE     (uid, appid)
);


CREATE TABLE application_comments (
  id         INTEGER PRIMARY KEY AUTOINCREMENT,
  appid      INTEGER NOT NULL,
  uid        INTEGER NOT NULL,
  comment    TEXT,
  time       INTEGER DEFAULT 0 NOT NULL
);


CREATE TABLE news (
  id         INTEGER PRIMARY KEY AUTOINCREMENT,
  uid        INTEGER NOT NULL,
  title      TEXT,
  content    TEXT,
  time       INTEGER
);



-- FACEBOOK FEEDS
{'fraction_non_alphanumeric': 0.04756533182929122, 'fraction_numerical': 0.017296484301560444, 'mean_word_length': 2.0210107893242477, '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': '1038107', 'n_tokens_mistral': 1849, 'n_tokens_neox': 1612, 'n_words': 623}