-- This file is automatically generated using maintenance/generateSchemaChangeSql.php.
-- Source: sql/ChangePrimaryKey.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
CREATE TEMPORARY TABLE /*_*/__temp__openid_connect AS
SELECT
  oidc_user,
  oidc_subject,
  oidc_issuer
FROM /*_*/openid_connect;
DROP TABLE /*_*/openid_connect;


CREATE TABLE /*_*/openid_connect (
    oidc_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
    oidc_user INTEGER UNSIGNED NOT NULL,
    oidc_subject BLOB NOT NULL, oidc_issuer BLOB NOT NULL
  );
INSERT INTO /*_*/openid_connect (
    oidc_user, oidc_subject, oidc_issuer
  )
SELECT
  oidc_user,
  oidc_subject,
  oidc_issuer
FROM
  /*_*/__temp__openid_connect;
DROP TABLE /*_*/__temp__openid_connect;

CREATE INDEX openid_connect_subject ON /*_*/openid_connect (oidc_subject, oidc_issuer);
