-- This file is automatically generated using maintenance/generateSchemaSql.php.
-- Source: maintenance/tables.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
CREATE TABLE /*_*/site_identifiers (
  si_type BLOB NOT NULL,
  si_key BLOB NOT NULL,
  si_site INTEGER UNSIGNED NOT NULL,
  PRIMARY KEY(si_type, si_key)
);

CREATE INDEX site_ids_site ON /*_*/site_identifiers (si_site);

CREATE INDEX site_ids_key ON /*_*/site_identifiers (si_key);


CREATE TABLE /*_*/updatelog (
  ul_key VARCHAR(255) NOT NULL,
  ul_value BLOB DEFAULT NULL,
  PRIMARY KEY(ul_key)
);


CREATE TABLE /*_*/actor (
  actor_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  actor_user INTEGER UNSIGNED DEFAULT NULL,
  actor_name BLOB NOT NULL
);

CREATE UNIQUE INDEX actor_user ON /*_*/actor (actor_user);

CREATE UNIQUE INDEX actor_name ON /*_*/actor (actor_name);


CREATE TABLE /*_*/user_former_groups (
  ufg_user INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  ufg_group BLOB DEFAULT '' NOT NULL,
  PRIMARY KEY(ufg_user, ufg_group)
);


CREATE TABLE /*_*/bot_passwords (
  bp_user INTEGER UNSIGNED NOT NULL,
  bp_app_id BLOB NOT NULL,
  bp_password BLOB NOT NULL,
  bp_token BLOB DEFAULT '' NOT NULL,
  bp_restrictions BLOB NOT NULL,
  bp_grants BLOB NOT NULL,
  PRIMARY KEY(bp_user, bp_app_id)
);


CREATE TABLE /*_*/comment (
  comment_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  comment_hash INTEGER NOT NULL, comment_text BLOB NOT NULL,
  comment_data BLOB DEFAULT NULL
);

CREATE INDEX comment_hash ON /*_*/comment (comment_hash);


CREATE TABLE /*_*/slots (
  slot_revision_id BIGINT UNSIGNED NOT NULL,
  slot_role_id SMALLINT UNSIGNED NOT NULL,
  slot_content_id BIGINT UNSIGNED NOT NULL,
  slot_origin BIGINT UNSIGNED NOT NULL,
  PRIMARY KEY(slot_revision_id, slot_role_id)
);

CREATE INDEX slot_revision_origin_role ON /*_*/slots (
  slot_revision_id, slot_origin, slot_role_id
);


CREATE TABLE /*_*/site_stats (
  ss_row_id INTEGER UNSIGNED NOT NULL,
  ss_total_edits BIGINT UNSIGNED DEFAULT NULL,
  ss_good_articles BIGINT UNSIGNED DEFAULT NULL,
  ss_total_pages BIGINT UNSIGNED DEFAULT NULL,
  ss_users BIGINT UNSIGNED DEFAULT NULL,
  ss_active_users BIGINT UNSIGNED DEFAULT NULL,
  ss_images BIGINT UNSIGNED DEFAULT NULL,
  PRIMARY KEY(ss_row_id)
);


CREATE TABLE /*_*/user_properties (
  up_user INTEGER UNSIGNED NOT NULL,
  up_property BLOB NOT NULL,
  up_value BLOB DEFAULT NULL,
  PRIMARY KEY(up_user, up_property)
);

CREATE INDEX up_property ON /*_*/user_properties (up_property);


CREATE TABLE /*_*/log_search (
  ls_field BLOB NOT NULL,
  ls_value VARCHAR(255) NOT NULL,
  ls_log_id INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  PRIMARY KEY(ls_field, ls_value, ls_log_id)
);

CREATE INDEX ls_log_id ON /*_*/log_search (ls_log_id);


CREATE TABLE /*_*/change_tag (
  ct_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  ct_rc_id INTEGER UNSIGNED DEFAULT NULL,
  ct_log_id INTEGER UNSIGNED DEFAULT NULL,
  ct_rev_id INTEGER UNSIGNED DEFAULT NULL,
  ct_params BLOB DEFAULT NULL, ct_tag_id INTEGER UNSIGNED NOT NULL
);

CREATE UNIQUE INDEX change_tag_rc_tag_id ON /*_*/change_tag (ct_rc_id, ct_tag_id);

CREATE UNIQUE INDEX change_tag_log_tag_id ON /*_*/change_tag (ct_log_id, ct_tag_id);

CREATE UNIQUE INDEX change_tag_rev_tag_id ON /*_*/change_tag (ct_rev_id, ct_tag_id);

CREATE INDEX change_tag_tag_id_id ON /*_*/change_tag (
  ct_tag_id, ct_rc_id, ct_rev_id, ct_log_id
);


CREATE TABLE /*_*/content (
  content_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  content_size INTEGER UNSIGNED NOT NULL,
  content_sha1 BLOB NOT NULL, content_model SMALLINT UNSIGNED NOT NULL,
  content_address BLOB NOT NULL
);


CREATE TABLE /*_*/l10n_cache (
  lc_lang BLOB NOT NULL,
  lc_key VARCHAR(255) NOT NULL,
  lc_value BLOB NOT NULL,
  PRIMARY KEY(lc_lang, lc_key)
);


CREATE TABLE /*_*/module_deps (
  md_module BLOB NOT NULL,
  md_skin BLOB NOT NULL,
  md_deps BLOB NOT NULL,
  PRIMARY KEY(md_module, md_skin)
);


CREATE TABLE /*_*/redirect (
  rd_from INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  rd_namespace INTEGER DEFAULT 0 NOT NULL,
  rd_title BLOB DEFAULT '' NOT NULL,
  rd_interwiki VARCHAR(32) DEFAULT NULL,
  rd_fragment BLOB DEFAULT NULL,
  PRIMARY KEY(rd_from)
);

CREATE INDEX rd_ns_title ON /*_*/redirect (rd_namespace, rd_title, rd_from);


CREATE TABLE /*_*/pagelinks (
  pl_from INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  pl_namespace INTEGER DEFAULT 0 NOT NULL,
  pl_title BLOB DEFAULT '' NOT NULL,
  pl_from_namespace INTEGER DEFAULT 0 NOT NULL,
  PRIMARY KEY(pl_from, pl_namespace, pl_title)
);

CREATE INDEX pl_namespace ON /*_*/pagelinks (pl_namespace, pl_title, pl_from);

CREATE INDEX pl_backlinks_namespace ON /*_*/pagelinks (
  pl_from_namespace, pl_namespace,
  pl_title, pl_from
);


CREATE TABLE /*_*/templatelinks (
  tl_from INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  tl_namespace INTEGER DEFAULT 0 NOT NULL,
  tl_title BLOB DEFAULT '' NOT NULL,
  tl_from_namespace INTEGER DEFAULT 0 NOT NULL,
  PRIMARY KEY(tl_from, tl_namespace, tl_title)
);

CREATE INDEX tl_namespace ON /*_*/templatelinks (tl_namespace, tl_title, tl_from);

CREATE INDEX tl_backlinks_namespace ON /*_*/templatelinks (
  tl_from_namespace, tl_namespace,
  tl_title, tl_from
);


CREATE TABLE /*_*/imagelinks (
  il_from INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  il_to BLOB DEFAULT '' NOT NULL,
  il_from_namespace INTEGER DEFAULT 0 NOT NULL,
  PRIMARY KEY(il_from, il_to)
);

CREATE INDEX il_to ON /*_*/imagelinks (il_to, il_from);

CREATE INDEX il_backlinks_namespace ON /*_*/imagelinks (
  il_from_namespace, il_to, il_from
);


CREATE TABLE /*_*/langlinks (
  ll_from INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  ll_lang BLOB DEFAULT '' NOT NULL,
  ll_title BLOB DEFAULT '' NOT NULL,
  PRIMARY KEY(ll_from, ll_lang)
);

CREATE INDEX ll_lang ON /*_*/langlinks (ll_lang, ll_title);


CREATE TABLE /*_*/iwlinks (
  iwl_from INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  iwl_prefix BLOB DEFAULT '' NOT NULL,
  iwl_title BLOB DEFAULT '' NOT NULL,
  PRIMARY KEY(iwl_from, iwl_prefix, iwl_title)
);

CREATE INDEX iwl_prefix_title_from ON /*_*/iwlinks (iwl_prefix, iwl_title, iwl_from);

CREATE INDEX iwl_prefix_from_title ON /*_*/iwlinks (iwl_prefix, iwl_from, iwl_title);


CREATE TABLE /*_*/category (
  cat_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  cat_title BLOB NOT NULL, cat_pages INTEGER DEFAULT 0 NOT NULL,
  cat_subcats INTEGER DEFAULT 0 NOT NULL,
  cat_files INTEGER DEFAULT 0 NOT NULL
);

CREATE UNIQUE INDEX cat_title ON /*_*/category (cat_title);

CREATE INDEX cat_pages ON /*_*/category (cat_pages);


CREATE TABLE /*_*/watchlist_expiry (
  we_item INTEGER UNSIGNED NOT NULL,
  we_expiry BLOB NOT NULL,
  PRIMARY KEY(we_item)
);

CREATE INDEX we_expiry ON /*_*/watchlist_expiry (we_expiry);


CREATE TABLE /*_*/change_tag_def (
  ctd_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  ctd_name BLOB NOT NULL, ctd_user_defined SMALLINT NOT NULL,
  ctd_count BIGINT UNSIGNED DEFAULT 0 NOT NULL
);

CREATE UNIQUE INDEX ctd_name ON /*_*/change_tag_def (ctd_name);

CREATE INDEX ctd_count ON /*_*/change_tag_def (ctd_count);

CREATE INDEX ctd_user_defined ON /*_*/change_tag_def (ctd_user_defined);


CREATE TABLE /*_*/ipblocks_restrictions (
  ir_ipb_id INTEGER NOT NULL,
  ir_type SMALLINT NOT NULL,
  ir_value INTEGER NOT NULL,
  PRIMARY KEY(ir_ipb_id, ir_type, ir_value)
);

CREATE INDEX ir_type_value ON /*_*/ipblocks_restrictions (ir_type, ir_value);


CREATE TABLE /*_*/querycache (
  qc_type BLOB NOT NULL, qc_value INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  qc_namespace INTEGER DEFAULT 0 NOT NULL,
  qc_title BLOB DEFAULT '' NOT NULL
);

CREATE INDEX qc_type ON /*_*/querycache (qc_type, qc_value);


CREATE TABLE /*_*/querycachetwo (
  qcc_type BLOB NOT NULL, qcc_value INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  qcc_namespace INTEGER DEFAULT 0 NOT NULL,
  qcc_title BLOB DEFAULT '' NOT NULL,
  qcc_namespacetwo INTEGER DEFAULT 0 NOT NULL,
  qcc_titletwo BLOB DEFAULT '' NOT NULL
);

CREATE INDEX qcc_type ON /*_*/querycachetwo (qcc_type, qcc_value);

CREATE INDEX qcc_title ON /*_*/querycachetwo (
  qcc_type, qcc_namespace, qcc_title
);

CREATE INDEX qcc_titletwo ON /*_*/querycachetwo (
  qcc_type, qcc_namespacetwo, qcc_titletwo
);


CREATE TABLE /*_*/page_restrictions (
  pr_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  pr_page INTEGER NOT NULL, pr_type BLOB NOT NULL,
  pr_level BLOB NOT NULL, pr_cascade SMALLINT NOT NULL,
  pr_user INTEGER UNSIGNED DEFAULT NULL,
  pr_expiry BLOB DEFAULT NULL
);

CREATE UNIQUE INDEX pr_pagetype ON /*_*/page_restrictions (pr_page, pr_type);

CREATE INDEX pr_typelevel ON /*_*/page_restrictions (pr_type, pr_level);

CREATE INDEX pr_level ON /*_*/page_restrictions (pr_level);

CREATE INDEX pr_cascade ON /*_*/page_restrictions (pr_cascade);


CREATE TABLE /*_*/user_groups (
  ug_user INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  ug_group BLOB DEFAULT '' NOT NULL,
  ug_expiry BLOB DEFAULT NULL,
  PRIMARY KEY(ug_user, ug_group)
);

CREATE INDEX ug_group ON /*_*/user_groups (ug_group);

CREATE INDEX ug_expiry ON /*_*/user_groups (ug_expiry);


CREATE TABLE /*_*/querycache_info (
  qci_type BLOB DEFAULT '' NOT NULL,
  qci_timestamp BLOB DEFAULT '19700101000000' NOT NULL,
  PRIMARY KEY(qci_type)
);


CREATE TABLE /*_*/watchlist (
  wl_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  wl_user INTEGER UNSIGNED NOT NULL,
  wl_namespace INTEGER DEFAULT 0 NOT NULL,
  wl_title BLOB DEFAULT '' NOT NULL, wl_notificationtimestamp BLOB DEFAULT NULL
);

CREATE UNIQUE INDEX wl_user ON /*_*/watchlist (wl_user, wl_namespace, wl_title);

CREATE INDEX wl_namespace_title ON /*_*/watchlist (wl_namespace, wl_title);

CREATE INDEX wl_user_notificationtimestamp ON /*_*/watchlist (
  wl_user, wl_notificationtimestamp
);


CREATE TABLE /*_*/sites (
  site_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  site_global_key BLOB NOT NULL,
  site_type BLOB NOT NULL,
  site_group BLOB NOT NULL,
  site_source BLOB NOT NULL,
  site_language BLOB NOT NULL,
  site_protocol BLOB NOT NULL,
  site_domain VARCHAR(255) NOT NULL,
  site_data BLOB NOT NULL,
  site_forward SMALLINT NOT NULL,
  site_config BLOB NOT NULL
);

CREATE UNIQUE INDEX site_global_key ON /*_*/sites (site_global_key);

CREATE INDEX site_type ON /*_*/sites (site_type);

CREATE INDEX site_group ON /*_*/sites (site_group);

CREATE INDEX site_source ON /*_*/sites (site_source);

CREATE INDEX site_language ON /*_*/sites (site_language);

CREATE INDEX site_protocol ON /*_*/sites (site_protocol);

CREATE INDEX site_domain ON /*_*/sites (site_domain);

CREATE INDEX site_forward ON /*_*/sites (site_forward);


CREATE TABLE /*_*/user_newtalk (
  user_id INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  user_ip BLOB DEFAULT '' NOT NULL, user_last_timestamp BLOB DEFAULT NULL
);

CREATE INDEX un_user_id ON /*_*/user_newtalk (user_id);

CREATE INDEX un_user_ip ON /*_*/user_newtalk (user_ip);


CREATE TABLE /*_*/interwiki (
  iw_prefix VARCHAR(32) NOT NULL,
  iw_url BLOB NOT NULL,
  iw_api BLOB NOT NULL,
  iw_wikiid VARCHAR(64) NOT NULL,
  iw_local SMALLINT NOT NULL,
  iw_trans SMALLINT DEFAULT 0 NOT NULL,
  PRIMARY KEY(iw_prefix)
);


CREATE TABLE /*_*/protected_titles (
  pt_namespace INTEGER NOT NULL,
  pt_title BLOB NOT NULL,
  pt_user INTEGER UNSIGNED NOT NULL,
  pt_reason_id BIGINT UNSIGNED NOT NULL,
  pt_timestamp BLOB NOT NULL,
  pt_expiry BLOB NOT NULL,
  pt_create_perm BLOB NOT NULL,
  PRIMARY KEY(pt_namespace, pt_title)
);

CREATE INDEX pt_timestamp ON /*_*/protected_titles (pt_timestamp);


CREATE TABLE /*_*/externallinks (
  el_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  el_from INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  el_to BLOB NOT NULL, el_index BLOB NOT NULL,
  el_index_60 BLOB NOT NULL
);

CREATE INDEX el_from ON /*_*/externallinks (el_from, el_to);

CREATE INDEX el_to ON /*_*/externallinks (el_to, el_from);

CREATE INDEX el_index ON /*_*/externallinks (el_index);

CREATE INDEX el_index_60 ON /*_*/externallinks (el_index_60, el_id);

CREATE INDEX el_from_index_60 ON /*_*/externallinks (el_from, el_index_60, el_id);


CREATE TABLE /*_*/ip_changes (
  ipc_rev_id INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  ipc_rev_timestamp BLOB NOT NULL,
  ipc_hex BLOB DEFAULT '' NOT NULL,
  PRIMARY KEY(ipc_rev_id)
);

CREATE INDEX ipc_rev_timestamp ON /*_*/ip_changes (ipc_rev_timestamp);

CREATE INDEX ipc_hex_time ON /*_*/ip_changes (ipc_hex, ipc_rev_timestamp);


CREATE TABLE /*_*/revision_comment_temp (
  revcomment_rev INTEGER UNSIGNED NOT NULL,
  revcomment_comment_id BIGINT UNSIGNED NOT NULL,
  PRIMARY KEY(
    revcomment_rev, revcomment_comment_id
  )
);

CREATE UNIQUE INDEX revcomment_rev ON /*_*/revision_comment_temp (revcomment_rev);


CREATE TABLE /*_*/revision_actor_temp (
  revactor_rev INTEGER UNSIGNED NOT NULL,
  revactor_actor BIGINT UNSIGNED NOT NULL,
  revactor_timestamp BLOB NOT NULL,
  revactor_page INTEGER UNSIGNED NOT NULL,
  PRIMARY KEY(revactor_rev, revactor_actor)
);

CREATE UNIQUE INDEX revactor_rev ON /*_*/revision_actor_temp (revactor_rev);

CREATE INDEX actor_timestamp ON /*_*/revision_actor_temp (
  revactor_actor, revactor_timestamp
);

CREATE INDEX page_actor_timestamp ON /*_*/revision_actor_temp (
  revactor_page, revactor_actor, revactor_timestamp
);


CREATE TABLE /*_*/page_props (
  pp_page INTEGER NOT NULL,
  pp_propname BLOB NOT NULL,
  pp_value BLOB NOT NULL,
  pp_sortkey DOUBLE PRECISION DEFAULT NULL,
  PRIMARY KEY(pp_page, pp_propname)
);

CREATE UNIQUE INDEX pp_propname_page ON /*_*/page_props (pp_propname, pp_page);

CREATE UNIQUE INDEX pp_propname_sortkey_page ON /*_*/page_props (pp_propname, pp_sortkey, pp_page);


CREATE TABLE /*_*/job (
  job_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  job_cmd BLOB DEFAULT '' NOT NULL, job_namespace INTEGER NOT NULL,
  job_title BLOB NOT NULL, job_timestamp BLOB DEFAULT NULL,
  job_params BLOB NOT NULL, job_random INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  job_attempts INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  job_token BLOB DEFAULT '' NOT NULL,
  job_token_timestamp BLOB DEFAULT NULL,
  job_sha1 BLOB DEFAULT '' NOT NULL
);

CREATE INDEX job_sha1 ON /*_*/job (job_sha1);

CREATE INDEX job_cmd_token ON /*_*/job (job_cmd, job_token, job_random);

CREATE INDEX job_cmd_token_id ON /*_*/job (job_cmd, job_token, job_id);

CREATE INDEX job_cmd ON /*_*/job (
  job_cmd, job_namespace, job_title,
  job_params
);

CREATE INDEX job_timestamp ON /*_*/job (job_timestamp);


CREATE TABLE /*_*/slot_roles (
  role_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  role_name BLOB NOT NULL
);

CREATE UNIQUE INDEX role_name ON /*_*/slot_roles (role_name);


CREATE TABLE /*_*/content_models (
  model_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  model_name BLOB NOT NULL
);

CREATE UNIQUE INDEX model_name ON /*_*/content_models (model_name);


CREATE TABLE /*_*/categorylinks (
  cl_from INTEGER UNSIGNED DEFAULT 0 NOT NULL,
  cl_to BLOB DEFAULT '' NOT NULL,
  cl_sortkey BLOB DEFAULT '' NOT NULL,
  cl_sortkey_prefix BLOB DEFAULT '' NOT NULL,
  cl_timestamp BLOB NOT NULL,
  cl_collation BLOB DEFAULT '' NOT NULL,
  cl_type TEXT DEFAULT 'page' NOT NULL,
  PRIMARY KEY(cl_from, cl_to)
);

CREATE INDEX cl_sortkey ON /*_*/categorylinks (
  cl_to, cl_type, cl_sortkey, cl_from
);

CREATE INDEX cl_timestamp ON /*_*/categorylinks (cl_to, cl_timestamp);

CREATE INDEX cl_collation_ext ON /*_*/categorylinks (
  cl_collation, cl_to, cl_type, cl_from
);


CREATE TABLE /*_*/logging (
  log_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  log_type BLOB DEFAULT '' NOT NULL, log_action BLOB DEFAULT '' NOT NULL,
  log_timestamp BLOB DEFAULT '19700101000000' NOT NULL,
  log_actor BIGINT UNSIGNED NOT NULL,
  log_namespace INTEGER DEFAULT 0 NOT NULL,
  log_title BLOB DEFAULT '' NOT NULL,
  log_page INTEGER UNSIGNED DEFAULT NULL,
  log_comment_id BIGINT UNSIGNED NOT NULL,
  log_params BLOB NOT NULL, log_deleted SMALLINT UNSIGNED DEFAULT 0 NOT NULL
);

CREATE INDEX log_type_time ON /*_*/logging (log_type, log_timestamp);

CREATE INDEX log_actor_time ON /*_*/logging (log_actor, log_timestamp);

CREATE INDEX log_page_time ON /*_*/logging (
  log_namespace, log_title, log_timestamp
);

CREATE INDEX log_times ON /*_*/logging (log_timestamp);

CREATE INDEX log_actor_type_time ON /*_*/logging (
  log_actor, log_type, log_timestamp
);

CREATE INDEX log_page_id_time ON /*_*/logging (log_page, log_timestamp);

CREATE INDEX log_type_action ON /*_*/logging (
  log_type, log_action, log_timestamp
);


CREATE TABLE /*_*/uploadstash (
  us_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  us_user INTEGER UNSIGNED NOT NULL,
  us_key VARCHAR(255) NOT NULL,
  us_orig_path VARCHAR(255) NOT NULL,
  us_path VARCHAR(255) NOT NULL,
  us_source_type VARCHAR(50) DEFAULT NULL,
  us_timestamp BLOB NOT NULL,
  us_status VARCHAR(50) NOT NULL,
  us_chunk_inx INTEGER UNSIGNED DEFAULT NULL,
  us_props BLOB DEFAULT NULL,
  us_size INTEGER UNSIGNED NOT NULL,
  us_sha1 VARCHAR(31) NOT NULL,
  us_mime VARCHAR(255) DEFAULT NULL,
  us_media_type TEXT DEFAULT NULL,
  us_image_width INTEGER UNSIGNED DEFAULT NULL,
  us_image_height INTEGER UNSIGNED DEFAULT NULL,
  us_image_bits SMALLINT UNSIGNED DEFAULT NULL
);

CREATE INDEX us_user ON /*_*/uploadstash (us_user);

CREATE UNIQUE INDEX us_key ON /*_*/uploadstash (us_key);

CREATE INDEX us_timestamp ON /*_*/uploadstash (us_timestamp);
