ALTER TABLE identities
	DROP COLUMN IF EXISTS issuertypescheme;
ALTER TABLE identities
	DROP CONSTRAINT IF EXISTS identities_issuertypeclass_fkey;

-- piwik ids from https://docs.google.com/spreadsheets/d/1_tanv8pCiupPxenxqhhKip6D_676-tOTi0RjkAYmUeY/edit#gid=0

BEGIN;
INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:13', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::307', 'piwik:13');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:14', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1255', 'piwik:14');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:15', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1619', 'piwik:15');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:16', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1271', 'piwik:16');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:19', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1714', 'piwik:19');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:20', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::7', 'piwik:20');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:21', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1689', 'piwik:21');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:22', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1445', 'piwik:22');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:23', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1621', 'piwik:23');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:24', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1564', 'piwik:24');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:25', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1501', 'piwik:25');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:26', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::2346', 'piwik:26');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:27', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::2016', 'piwik:27');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:28', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1716', 'piwik:28');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:30', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::2017', 'piwik:30');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:31', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1620', 'piwik:31');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:32', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1502', 'piwik:32');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:33', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1503', 'piwik:33');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:34', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::2340', 'piwik:34');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:35', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1715', 'piwik:35');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:36', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::2018', 'piwik:36');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:37', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::2019', 'piwik:37');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:38', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1504', 'piwik:38');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:39', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::2187', 'piwik:39');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:40', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::1505', 'piwik:40');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:42', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::2020', 'piwik:42');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:43', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::2594', 'piwik:43');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:44', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::2595', 'piwik:44');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:45', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::3162', 'piwik:45');

INSERT INTO identities (pid, issuertypeclass) VALUES ('piwik:48', 'piwik');
INSERT INTO datasourcepids (datasource, pid) VALUES ('opendoar____::2584', 'piwik:48');

END;