-- 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 /*_*/geo_tags (
  gt_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  gt_page_id INTEGER UNSIGNED NOT NULL,
  gt_globe VARCHAR(32) NOT NULL,
  gt_primary SMALLINT NOT NULL,
  gt_lat_int SMALLINT DEFAULT NULL,
  gt_lon_int SMALLINT DEFAULT NULL,
  gt_lat NUMERIC(11, 8) NOT NULL,
  gt_lon NUMERIC(11, 8) NOT NULL,
  gt_dim INTEGER DEFAULT NULL,
  gt_type VARCHAR(32) DEFAULT NULL,
  gt_name BLOB DEFAULT NULL,
  gt_country CHAR(2) DEFAULT NULL,
  gt_region VARCHAR(3) DEFAULT NULL
);

CREATE INDEX gt_page_primary ON /*_*/geo_tags (gt_page_id, gt_primary);

CREATE INDEX gt_page_id_id ON /*_*/geo_tags (gt_page_id);

CREATE INDEX gt_spatial ON /*_*/geo_tags (
  gt_lat_int, gt_lon_int, gt_lon, gt_primary
);
