-- This file is automatically generated using maintenance/generateSchemaSql.php.
-- Source: sql/tables.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
CREATE TABLE /*_*/globaljsonlinks_target (
  gjlt_id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL,
  gjlt_namespace INT NOT NULL,
  gjlt_title VARBINARY(255) NOT NULL,
  UNIQUE INDEX gjlt_namespace_title (gjlt_namespace, gjlt_title),
  PRIMARY KEY(gjlt_id)
) /*$wgDBTableOptions*/;


CREATE TABLE /*_*/globaljsonlinks_wiki (
  gjlw_id INT UNSIGNED AUTO_INCREMENT NOT NULL,
  gjlw_wiki VARBINARY(32) NOT NULL,
  gjlw_namespace INT DEFAULT NULL,
  gjlw_namespace_text VARBINARY(255) DEFAULT NULL,
  UNIQUE INDEX gjlw_wiki_id_namespace (
    gjlw_wiki, gjlw_namespace, gjlw_namespace_text
  ),
  PRIMARY KEY(gjlw_id)
) /*$wgDBTableOptions*/;


CREATE TABLE /*_*/globaljsonlinks (
  gjl_wiki INT NOT NULL,
  gjl_namespace INT NOT NULL,
  gjl_title VARBINARY(255) NOT NULL,
  gjl_target BIGINT UNSIGNED NOT NULL,
  INDEX gjl_target_namespace_title (
    gjl_target, gjl_wiki, gjl_namespace,
    gjl_title
  ),
  PRIMARY KEY(
    gjl_wiki, gjl_namespace, gjl_title,
    gjl_target
  )
) /*$wgDBTableOptions*/;
