-- 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 /*_*/oathauth_types (
  oat_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  oat_name BLOB NOT NULL
);

CREATE UNIQUE INDEX oat_name ON /*_*/oathauth_types (oat_name);


CREATE TABLE /*_*/oathauth_devices (
  oad_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  oad_user INTEGER NOT NULL, oad_type INTEGER NOT NULL,
  oad_name BLOB DEFAULT NULL, oad_created BLOB DEFAULT NULL,
  oad_data BLOB DEFAULT NULL
);

CREATE INDEX oad_user ON /*_*/oathauth_devices (oad_user);


CREATE TABLE /*_*/oathauth_user_handles (
  oah_user INTEGER UNSIGNED NOT NULL,
  oah_handle BLOB DEFAULT NULL,
  PRIMARY KEY(oah_user)
);

CREATE UNIQUE INDEX oah_handle ON /*_*/oathauth_user_handles (oah_handle);
