<commit_before>create table apps(
  id        text primary key not null,
  versions int[]
);

create table app_versions(
  id           serial         primary key not null,
  app            text references apps(id) not null,
  store          text                     not null,
  region         text                     not null,
  version        text                     not null,
  screen_flags    int
);

create table developers(
  id         serial primary key not null,
  email      text[]             not null,
  name         text             not null,
  store_site   text                     ,
  site         text
);

create table playstore_apps(
  id                      int primary key references app_versions(id) not null,
  title                  text                                         not null,
  summary                text                                                 ,
  description            text                                                 ,
  store_url              text                                         not null,
  price                  text                                         not null,
  free                   bool                                         not null,
  rating         numeric(2,1)                                                 ,
  num_reviews             int                                                 ,
  genre                  text                                                 ,
  family_genre           text                                                 ,
  min_installs            int                                                 ,
  max_installs            int                                                 ,
  developer               int               references developers(id) not null,
  updated                date                                         not null,
  android_ver            text                                         not null,
  content_rating         text                                         not null,
  screenshots          text[]                                                 ,
  video                  text                                                 ,
  recent_changes       text[]                                                 ,
  region                 text                                         not null,
  crawl_date             date                                         not null
);

create table app_perms(
  id       int references app_versions(id) primary key not null,
  perms text[]                                         not null
);

-- Contains the hostnames that were found in apps via analysis
create table app_hosts(
  id         int references app_versions(id) primary key not null,
  hosts    int[]                                                 ,<commit_msg>final (???) db update<commit_after>create table apps(
  id        text primary key not null,
  versions int[]
);

create table app_versions(
  id           serial         primary key not null,
  app            text references apps(id) not null,
  store          text                     not null,
  region         text                     not null,
  version        text                     not null,
  screen_flags    int
);

create table developers(
  id         serial primary key not null,
  email      text[]             not null,
  name         text             not null,
  store_site   text                     ,
  site         text
);

create table playstore_apps(
  id                      int primary key references app_versions(id) not null,
  title                  text                                         not null,
  summary                text                                                 ,
  description            text                                                 ,
  store_url              text                                         not null,
  price                  text                                         not null,
  free                   bool                                         not null,
  rating         numeric(2,1)                                                 ,
  num_reviews             int                                                 ,
  genre                  text                                                 ,
  family_genre           text                                                 ,
  min_installs            int                                                 ,
  max_installs            int                                                 ,
  developer               int               references developers(id) not null,
  updated                date                                         not null,
  android_ver            text                                         not null,
  content_rating         text                                                 ,
  screenshots          text[]                                                 ,
  video                  text                                                 ,
  recent_changes       text[]                                                 ,
  crawl_date             date                                         not null
);

create table app_perms(
  id       int references app_versions(id) primary key not null,
  perms text[]                                         not null
);

-- Contains the hostnames that were found in apps via analysis
create table app_hosts(
  id         int references app_versions(id) primary key not null,
  hosts    int[]                                                 ,
{'fraction_non_alphanumeric': 0.029613578909353556, 'fraction_numerical': 0.0007222824124232575, 'mean_word_length': 0.5866513892867373, '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': 86, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1300844', 'n_tokens_mistral': 906, 'n_tokens_neox': 881, 'n_words': 344}