-- 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 TEXT NOT NULL,
  si_key TEXT NOT NULL,
  si_site INT 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 TEXT DEFAULT NULL,
  PRIMARY KEY(ul_key)
);
CREATE TABLE actor (
  actor_id BIGSERIAL NOT NULL,
  actor_user INT DEFAULT NULL,
  actor_name TEXT NOT NULL,
  PRIMARY KEY(actor_id)
);
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 INT DEFAULT 0 NOT NULL,
  ufg_group TEXT DEFAULT '' NOT NULL,
  PRIMARY KEY(ufg_user, ufg_group)
);