diff --git a/misc-scripts/ontology/sql/patch_95_96_a.sql b/misc-scripts/ontology/sql/patch_95_96_a.sql
new file mode 100644
index 0000000000000000000000000000000000000000..ae45308d5e0cf35dcae00c4e88221dd86ee46ffe
--- /dev/null
+++ b/misc-scripts/ontology/sql/patch_95_96_a.sql
@@ -0,0 +1,27 @@
+-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
+-- Copyright [2016-2018] EMBL-European Bioinformatics Institute
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+--      http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+# patch_95_96_a.sql
+#
+# Title: Update schema version.
+#
+# Description:
+#   Update schema_version in meta table to 96.
+
+UPDATE meta SET meta_value='96' WHERE meta_key='schema_version';
+
+# Patch identifier
+INSERT INTO meta (species_id, meta_key, meta_value)
+  VALUES (NULL, 'patch', 'patch_95_96_a.sql|schema_version');
diff --git a/misc-scripts/ontology/sql/tables.sql b/misc-scripts/ontology/sql/tables.sql
index 3c87ab714f32f3195d3c165d1d217d3381739e4e..6c640bc30f84e5cf0135c216dcd25653b20cab3a 100644
--- a/misc-scripts/ontology/sql/tables.sql
+++ b/misc-scripts/ontology/sql/tables.sql
@@ -31,11 +31,11 @@ CREATE TABLE meta (
 # Add schema type and schema version to the meta table
 INSERT INTO meta (meta_key, meta_value) VALUES
   ('schema_type', 'ontology'),
-  ('schema_version', '95');
+  ('schema_version', '96');
 
 # Patches included in this schema file
 INSERT INTO meta (meta_key, meta_value)
-  VALUES ('patch', 'patch_94_95_a.sql|schema_version');
+  VALUES ('patch', 'patch_95_96_a.sql|schema_version');
 
 
 CREATE TABLE ontology (
diff --git a/modules/Bio/EnsEMBL/ApiVersion.pm b/modules/Bio/EnsEMBL/ApiVersion.pm
index 2e92dfaa9a7a7b560291c953eb0f84f4acaa7cca..0c354f0a78bd58e081b0337b5fc8ae79b80f55ed 100644
--- a/modules/Bio/EnsEMBL/ApiVersion.pm
+++ b/modules/Bio/EnsEMBL/ApiVersion.pm
@@ -56,7 +56,7 @@ use base qw( Exporter );
 
 our @EXPORT = qw( software_version );
 
-my $API_VERSION = 95;
+my $API_VERSION = 96;
 
 sub software_version { return $API_VERSION }
 
diff --git a/modules/t/test-genome-DBs/circ/core/SQLite/table.sql b/modules/t/test-genome-DBs/circ/core/SQLite/table.sql
index e71032dd75d2b665cb582b914f93db93e9b5f18b..6cfc3dc48e88e96bc390cbaf0bc719743c87ecc4 100644
--- a/modules/t/test-genome-DBs/circ/core/SQLite/table.sql
+++ b/modules/t/test-genome-DBs/circ/core/SQLite/table.sql
@@ -1,6 +1,6 @@
 -- 
 -- Created by SQL::Translator::Producer::SQLite
--- Created on Wed Sep 26 16:18:37 2018
+-- Created on Thu Dec  6 13:49:32 2018
 -- 
 
 BEGIN TRANSACTION;
@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" (
   "analysis_id" smallint
 );
 
-CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id", "analysis_id");
+CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id");
 
 --
 -- Table: "ontology_xref"
diff --git a/modules/t/test-genome-DBs/circ/core/meta.txt b/modules/t/test-genome-DBs/circ/core/meta.txt
index 30f84bebc8d7679b022d60b7d63cc05b7846cdc1..0f00085059ba186a71b910ac906a2452ae22ce96 100644
--- a/modules/t/test-genome-DBs/circ/core/meta.txt
+++ b/modules/t/test-genome-DBs/circ/core/meta.txt
@@ -39,7 +39,7 @@
 95	\N	patch	patch_83_84_c.sql|protein_feature_unique
 96	\N	patch	patch_83_84_d.sql|longer_synonym
 1	\N	schema_type	core
-2	\N	schema_version	95
+2	\N	schema_version	96
 8	1	assembly.accession	GCA_000292705.1
 10	1	assembly.date	2012-08
 7	1	assembly.default	GCA_000292705.1
@@ -124,3 +124,5 @@
 124	\N	patch	patch_93_94_c.sql|default_aln_type
 125	\N	patch	patch_94_95_a.sql|schema_version
 126	\N	patch	patch_94_95_b.sql|vertebrate_division_rename
+127	\N	patch	patch_94_95_c.sql|ox_key_update
+128	\N	patch	patch_95_96_a.sql|schema_version
diff --git a/modules/t/test-genome-DBs/circ/core/table.sql b/modules/t/test-genome-DBs/circ/core/table.sql
index b05af441604c045cc167414c8f35450e4c4658eb..9e8bfbfd26ab6ef1a3ce2aa142ad66ba189c77a6 100644
--- a/modules/t/test-genome-DBs/circ/core/table.sql
+++ b/modules/t/test-genome-DBs/circ/core/table.sql
@@ -489,7 +489,7 @@ CREATE TABLE `meta` (
   PRIMARY KEY (`meta_id`),
   UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
   KEY `species_value_idx` (`species_id`,`meta_value`)
-) ENGINE=MyISAM AUTO_INCREMENT=127 DEFAULT CHARSET=latin1;
+) ENGINE=MyISAM AUTO_INCREMENT=129 DEFAULT CHARSET=latin1;
 
 CREATE TABLE `meta_coord` (
   `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
@@ -543,7 +543,7 @@ CREATE TABLE `object_xref` (
   `linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL,
   `analysis_id` smallint(5) unsigned DEFAULT NULL,
   PRIMARY KEY (`object_xref_id`),
-  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`,`analysis_id`),
+  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`),
   KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`),
   KEY `analysis_idx` (`analysis_id`)
 ) ENGINE=MyISAM AUTO_INCREMENT=81424 DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
diff --git a/modules/t/test-genome-DBs/homo_sapiens/core/SQLite/table.sql b/modules/t/test-genome-DBs/homo_sapiens/core/SQLite/table.sql
index bbe8bf287f774a3a069a42f49bc2a6a052ee193e..46be5faf1bfe1ff2be103921dc444be196530d62 100644
--- a/modules/t/test-genome-DBs/homo_sapiens/core/SQLite/table.sql
+++ b/modules/t/test-genome-DBs/homo_sapiens/core/SQLite/table.sql
@@ -1,6 +1,6 @@
 -- 
 -- Created by SQL::Translator::Producer::SQLite
--- Created on Wed Sep 26 16:18:44 2018
+-- Created on Thu Dec  6 13:49:43 2018
 -- 
 
 BEGIN TRANSACTION;
@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" (
   "analysis_id" smallint
 );
 
-CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id", "analysis_id");
+CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id");
 
 --
 -- Table: "ontology_xref"
diff --git a/modules/t/test-genome-DBs/homo_sapiens/core/meta.txt b/modules/t/test-genome-DBs/homo_sapiens/core/meta.txt
index e5c2f8e928f4effebc3e11ee88d493aef973ccc7..79413d36ea45ddb39a7435cbf73eff9ad5dc1528 100644
--- a/modules/t/test-genome-DBs/homo_sapiens/core/meta.txt
+++ b/modules/t/test-genome-DBs/homo_sapiens/core/meta.txt
@@ -1,4 +1,4 @@
-1	\N	schema_version	95
+1	\N	schema_version	96
 2	1	assembly.default	NCBI34
 3	1	species.taxonomy_id	9606
 26	1	species.classification	Homo sapiens
@@ -103,3 +103,5 @@
 170	\N	patch	patch_93_94_c.sql|default_aln_type
 171	\N	patch	patch_94_95_a.sql|schema_version
 172	\N	patch	patch_94_95_b.sql|vertebrate_division_rename
+173	\N	patch	patch_94_95_c.sql|ox_key_update
+174	\N	patch	patch_95_96_a.sql|schema_version
diff --git a/modules/t/test-genome-DBs/homo_sapiens/core/table.sql b/modules/t/test-genome-DBs/homo_sapiens/core/table.sql
index 2c0d8b3095318f5b23eecc849b78e2548a3af9b0..475f7bccb3afa788e07d866b2252b66bae0a8102 100644
--- a/modules/t/test-genome-DBs/homo_sapiens/core/table.sql
+++ b/modules/t/test-genome-DBs/homo_sapiens/core/table.sql
@@ -489,7 +489,7 @@ CREATE TABLE `meta` (
   PRIMARY KEY (`meta_id`),
   UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
   KEY `species_value_idx` (`species_id`,`meta_value`)
-) ENGINE=MyISAM AUTO_INCREMENT=173 DEFAULT CHARSET=latin1;
+) ENGINE=MyISAM AUTO_INCREMENT=175 DEFAULT CHARSET=latin1;
 
 CREATE TABLE `meta_coord` (
   `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
@@ -543,7 +543,7 @@ CREATE TABLE `object_xref` (
   `linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL,
   `analysis_id` smallint(5) unsigned DEFAULT NULL,
   PRIMARY KEY (`object_xref_id`),
-  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`,`analysis_id`),
+  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`),
   KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`),
   KEY `analysis_idx` (`analysis_id`)
 ) ENGINE=MyISAM AUTO_INCREMENT=253694 DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
diff --git a/modules/t/test-genome-DBs/homo_sapiens/empty/SQLite/table.sql b/modules/t/test-genome-DBs/homo_sapiens/empty/SQLite/table.sql
index 6554a7b6ccf572083ae9d87918d46182d316aba5..56fd7aa9d7f21252c81177113085d90c7e6ebffc 100644
--- a/modules/t/test-genome-DBs/homo_sapiens/empty/SQLite/table.sql
+++ b/modules/t/test-genome-DBs/homo_sapiens/empty/SQLite/table.sql
@@ -1,6 +1,6 @@
 -- 
 -- Created by SQL::Translator::Producer::SQLite
--- Created on Wed Sep 26 16:18:52 2018
+-- Created on Thu Dec  6 13:49:54 2018
 -- 
 
 BEGIN TRANSACTION;
@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" (
   "analysis_id" smallint
 );
 
-CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id", "analysis_id");
+CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id");
 
 --
 -- Table: "ontology_xref"
diff --git a/modules/t/test-genome-DBs/homo_sapiens/empty/meta.txt b/modules/t/test-genome-DBs/homo_sapiens/empty/meta.txt
index ac2df6ea004ba0a3072d07bc6e467a82395d92ec..e1280cd03a2c891a9a65157d046f475f69513751 100644
--- a/modules/t/test-genome-DBs/homo_sapiens/empty/meta.txt
+++ b/modules/t/test-genome-DBs/homo_sapiens/empty/meta.txt
@@ -1,4 +1,4 @@
-1	\N	schema_version	95
+1	\N	schema_version	96
 2	1	assembly.default	NCBI34
 33	1	species.classification	Chordata
 32	1	species.classification	Vertebrata
@@ -103,3 +103,5 @@
 152	\N	patch	patch_93_94_c.sql|default_aln_type
 153	\N	patch	patch_94_95_a.sql|schema_version
 154	\N	patch	patch_94_95_b.sql|vertebrate_division_rename
+155	\N	patch	patch_94_95_c.sql|ox_key_update
+156	\N	patch	patch_95_96_a.sql|schema_version
diff --git a/modules/t/test-genome-DBs/homo_sapiens/empty/table.sql b/modules/t/test-genome-DBs/homo_sapiens/empty/table.sql
index 18daf1d3272bf1b436fe402da169878ba898a479..4e304aacff551ceac229597d61e5225848b859c7 100644
--- a/modules/t/test-genome-DBs/homo_sapiens/empty/table.sql
+++ b/modules/t/test-genome-DBs/homo_sapiens/empty/table.sql
@@ -489,7 +489,7 @@ CREATE TABLE `meta` (
   PRIMARY KEY (`meta_id`),
   UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
   KEY `species_value_idx` (`species_id`,`meta_value`)
-) ENGINE=MyISAM AUTO_INCREMENT=155 DEFAULT CHARSET=latin1;
+) ENGINE=MyISAM AUTO_INCREMENT=157 DEFAULT CHARSET=latin1;
 
 CREATE TABLE `meta_coord` (
   `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
@@ -543,7 +543,7 @@ CREATE TABLE `object_xref` (
   `linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL,
   `analysis_id` smallint(5) unsigned DEFAULT NULL,
   PRIMARY KEY (`object_xref_id`),
-  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`,`analysis_id`),
+  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`),
   KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`),
   KEY `analysis_idx` (`analysis_id`)
 ) ENGINE=MyISAM AUTO_INCREMENT=81424 DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
diff --git a/modules/t/test-genome-DBs/homo_sapiens/patch/SQLite/table.sql b/modules/t/test-genome-DBs/homo_sapiens/patch/SQLite/table.sql
index 2a99a1bcc3f4ac19ae64d163b230175595c703cf..0b6157fae5656335dfa207216beb1aae3162b5d6 100644
--- a/modules/t/test-genome-DBs/homo_sapiens/patch/SQLite/table.sql
+++ b/modules/t/test-genome-DBs/homo_sapiens/patch/SQLite/table.sql
@@ -1,6 +1,6 @@
 -- 
 -- Created by SQL::Translator::Producer::SQLite
--- Created on Wed Sep 26 16:18:59 2018
+-- Created on Thu Dec  6 13:50:04 2018
 -- 
 
 BEGIN TRANSACTION;
@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" (
   "analysis_id" smallint
 );
 
-CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id", "analysis_id");
+CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id");
 
 --
 -- Table: "ontology_xref"
diff --git a/modules/t/test-genome-DBs/homo_sapiens/patch/meta.txt b/modules/t/test-genome-DBs/homo_sapiens/patch/meta.txt
index e07c5ccb3bb0548321ccb1aae306fcf110af70d5..9f249a0f6b4594eef38e8640a4533aa2a5b2ec44 100644
--- a/modules/t/test-genome-DBs/homo_sapiens/patch/meta.txt
+++ b/modules/t/test-genome-DBs/homo_sapiens/patch/meta.txt
@@ -1,4 +1,4 @@
-1	\N	schema_version	95
+1	\N	schema_version	96
 2014	1	species.classification	Haplorrhini
 40	1	assembly.default	GRCh37
 41	1	assembly.date	2009-02
@@ -108,3 +108,5 @@
 2115	\N	patch	patch_93_94_c.sql|default_aln_type
 2116	\N	patch	patch_94_95_a.sql|schema_version
 2117	\N	patch	patch_94_95_b.sql|vertebrate_division_rename
+2118	\N	patch	patch_94_95_c.sql|ox_key_update
+2119	\N	patch	patch_95_96_a.sql|schema_version
diff --git a/modules/t/test-genome-DBs/homo_sapiens/patch/table.sql b/modules/t/test-genome-DBs/homo_sapiens/patch/table.sql
index 3cf66294587677323bb1e58e36202426b9fbe2d9..b18827ebbe4d8533414f63beffb1f5aef03360aa 100644
--- a/modules/t/test-genome-DBs/homo_sapiens/patch/table.sql
+++ b/modules/t/test-genome-DBs/homo_sapiens/patch/table.sql
@@ -489,7 +489,7 @@ CREATE TABLE `meta` (
   PRIMARY KEY (`meta_id`),
   UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
   KEY `species_value_idx` (`species_id`,`meta_value`)
-) ENGINE=MyISAM AUTO_INCREMENT=2118 DEFAULT CHARSET=latin1;
+) ENGINE=MyISAM AUTO_INCREMENT=2120 DEFAULT CHARSET=latin1;
 
 CREATE TABLE `meta_coord` (
   `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
@@ -543,7 +543,7 @@ CREATE TABLE `object_xref` (
   `linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL,
   `analysis_id` smallint(5) unsigned DEFAULT NULL,
   PRIMARY KEY (`object_xref_id`),
-  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`,`analysis_id`),
+  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`),
   KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`),
   KEY `analysis_idx` (`analysis_id`)
 ) ENGINE=MyISAM AUTO_INCREMENT=17375428 DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
diff --git a/modules/t/test-genome-DBs/homo_sapiens/variation/meta.txt b/modules/t/test-genome-DBs/homo_sapiens/variation/meta.txt
index c00237682b584d3db3eb62b72859b9f0b4f464f5..b5bf4f617eb794342eb6ff5a98382bd387303d69 100644
--- a/modules/t/test-genome-DBs/homo_sapiens/variation/meta.txt
+++ b/modules/t/test-genome-DBs/homo_sapiens/variation/meta.txt
@@ -1,5 +1,5 @@
 1	\N	schema_type	variation
-2	\N	schema_version	95
+2	\N	schema_version	96
 3	\N	patch	patch_84_85_a.sql|schema version
 4	\N	patch	patch_84_85_b.sql|create sample_synonym
 5	\N	patch	patch_84_85_c.sql|drop column moltype from variation_synonym
@@ -34,3 +34,4 @@
 34	\N	patch	patch_93_94_a.sql|schema version
 35	\N	patch	patch_94_95_a.sql|schema version
 36	\N	patch	patch_94_95_b.sql|create table to store allele synonyms
+37	\N	patch	patch_95_96_a.sql|schema_version
diff --git a/modules/t/test-genome-DBs/homo_sapiens/variation/table.sql b/modules/t/test-genome-DBs/homo_sapiens/variation/table.sql
index c24098df162faf2c6633d83137142953f6db7890..f3cff10d4bb6346208380df7a03f8adcf5a88308 100644
--- a/modules/t/test-genome-DBs/homo_sapiens/variation/table.sql
+++ b/modules/t/test-genome-DBs/homo_sapiens/variation/table.sql
@@ -178,7 +178,7 @@ CREATE TABLE `meta` (
   PRIMARY KEY (`meta_id`),
   UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
   KEY `species_value_idx` (`species_id`,`meta_value`)
-) ENGINE=MyISAM AUTO_INCREMENT=37 DEFAULT CHARSET=latin1;
+) ENGINE=MyISAM AUTO_INCREMENT=38 DEFAULT CHARSET=latin1;
 
 CREATE TABLE `meta_coord` (
   `table_name` varchar(40) NOT NULL,
diff --git a/modules/t/test-genome-DBs/homo_sapiens/xref/SQLite/table.sql b/modules/t/test-genome-DBs/homo_sapiens/xref/SQLite/table.sql
new file mode 100644
index 0000000000000000000000000000000000000000..f8095456fd5cfee352a14b5804306be57cb89ed5
--- /dev/null
+++ b/modules/t/test-genome-DBs/homo_sapiens/xref/SQLite/table.sql
@@ -0,0 +1,8 @@
+-- 
+-- Created by SQL::Translator::Producer::SQLite
+-- Created on Thu Dec  6 13:50:07 2018
+-- 
+
+BEGIN TRANSACTION;
+
+COMMIT;
diff --git a/modules/t/test-genome-DBs/mapping/core/SQLite/table.sql b/modules/t/test-genome-DBs/mapping/core/SQLite/table.sql
index b4447cd5601ba9d5947f0e73092f5d12516eb6fb..5df421d57c9b7f72e0e0125a146878c37b162e56 100644
--- a/modules/t/test-genome-DBs/mapping/core/SQLite/table.sql
+++ b/modules/t/test-genome-DBs/mapping/core/SQLite/table.sql
@@ -1,6 +1,6 @@
 -- 
 -- Created by SQL::Translator::Producer::SQLite
--- Created on Wed Sep 26 16:19:07 2018
+-- Created on Thu Dec  6 13:50:17 2018
 -- 
 
 BEGIN TRANSACTION;
@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" (
   "analysis_id" smallint
 );
 
-CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id", "analysis_id");
+CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id");
 
 --
 -- Table: "ontology_xref"
diff --git a/modules/t/test-genome-DBs/mapping/core/meta.txt b/modules/t/test-genome-DBs/mapping/core/meta.txt
index 97d5d53c3481d0741988c6d870ea0a86d97ca67e..fe15eabfaeffa89f66c2b8d2afe83be2b6d75bc2 100644
--- a/modules/t/test-genome-DBs/mapping/core/meta.txt
+++ b/modules/t/test-genome-DBs/mapping/core/meta.txt
@@ -1,4 +1,4 @@
-1	\N	schema_version	95
+1	\N	schema_version	96
 2	1	assembly.default	MULTIMAP
 3	1	species.taxonomy_id	1
 4	1	assembly.mapping	chromosome:MULTIMAP#contig
@@ -64,3 +64,5 @@
 157	\N	patch	patch_93_94_c.sql|default_aln_type
 158	\N	patch	patch_94_95_a.sql|schema_version
 159	\N	patch	patch_94_95_b.sql|vertebrate_division_rename
+160	\N	patch	patch_94_95_c.sql|ox_key_update
+161	\N	patch	patch_95_96_a.sql|schema_version
diff --git a/modules/t/test-genome-DBs/mapping/core/table.sql b/modules/t/test-genome-DBs/mapping/core/table.sql
index 84024d6623f444b376952b209f5755ec3a8c79bd..455c18b4658d9f96a8e015fa9593b68bb3c99f46 100644
--- a/modules/t/test-genome-DBs/mapping/core/table.sql
+++ b/modules/t/test-genome-DBs/mapping/core/table.sql
@@ -489,7 +489,7 @@ CREATE TABLE `meta` (
   PRIMARY KEY (`meta_id`),
   UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
   KEY `species_value_idx` (`species_id`,`meta_value`)
-) ENGINE=MyISAM AUTO_INCREMENT=160 DEFAULT CHARSET=latin1;
+) ENGINE=MyISAM AUTO_INCREMENT=162 DEFAULT CHARSET=latin1;
 
 CREATE TABLE `meta_coord` (
   `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
@@ -543,7 +543,7 @@ CREATE TABLE `object_xref` (
   `linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL,
   `analysis_id` smallint(5) unsigned DEFAULT NULL,
   PRIMARY KEY (`object_xref_id`),
-  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`,`analysis_id`),
+  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`),
   KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`),
   KEY `analysis_idx` (`analysis_id`)
 ) ENGINE=MyISAM AUTO_INCREMENT=81424 DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
diff --git a/modules/t/test-genome-DBs/multi/compara/SQLite/table.sql b/modules/t/test-genome-DBs/multi/compara/SQLite/table.sql
index c1914dc60d84e7667b8526de4d92d181b19b7818..f07c9e0894cbfb29ff4392543d679b43f8b673a3 100644
--- a/modules/t/test-genome-DBs/multi/compara/SQLite/table.sql
+++ b/modules/t/test-genome-DBs/multi/compara/SQLite/table.sql
@@ -1,6 +1,6 @@
 -- 
 -- Created by SQL::Translator::Producer::SQLite
--- Created on Wed Sep 26 16:19:13 2018
+-- Created on Thu Dec  6 13:50:26 2018
 -- 
 
 BEGIN TRANSACTION;
diff --git a/modules/t/test-genome-DBs/multi/compara/meta.txt b/modules/t/test-genome-DBs/multi/compara/meta.txt
index 6d5bed19aec312a9c159b963abe25d1683c4325e..0c03392e903136bd17fdbce302165d257ac4ecae 100644
--- a/modules/t/test-genome-DBs/multi/compara/meta.txt
+++ b/modules/t/test-genome-DBs/multi/compara/meta.txt
@@ -1,4 +1,4 @@
-57	\N	schema_version	95
+57	\N	schema_version	96
 2	\N	schema_type	compara
 3	\N	patch	patch_84_85_a.sql|schema_version
 4	\N	patch	patch_84_85_b.sql|gene_tree_root_attr
@@ -49,3 +49,4 @@
 59	\N	patch	patch_94_95_b.sql|remove_unused_indices
 60	\N	patch	patch_94_95_c.sql|genome_db_is_good_for_alignment
 61	\N	patch	patch_94_95_d.sql|node_type_within_species_speciation
+62	\N	patch	patch_95_96_a.sql|schema_version
diff --git a/modules/t/test-genome-DBs/multi/compara/table.sql b/modules/t/test-genome-DBs/multi/compara/table.sql
index 26bf1a0f657c9e903cef63f1b61823122376b6e8..01293dc1f2b92da99fd5c3fdb9b9a2fd10310efd 100644
--- a/modules/t/test-genome-DBs/multi/compara/table.sql
+++ b/modules/t/test-genome-DBs/multi/compara/table.sql
@@ -429,7 +429,7 @@ CREATE TABLE `meta` (
   PRIMARY KEY (`meta_id`),
   UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`(255)),
   KEY `species_value_idx` (`species_id`,`meta_value`(255))
-) ENGINE=MyISAM AUTO_INCREMENT=62 DEFAULT CHARSET=latin1;
+) ENGINE=MyISAM AUTO_INCREMENT=63 DEFAULT CHARSET=latin1;
 
 CREATE TABLE `method_link` (
   `method_link_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
diff --git a/modules/t/test-genome-DBs/mus_musculus/core/SQLite/table.sql b/modules/t/test-genome-DBs/mus_musculus/core/SQLite/table.sql
index 03da964e638dd94038ac56f071372b61957ad371..c19719984584410924f25ea9ce26239f562e429c 100644
--- a/modules/t/test-genome-DBs/mus_musculus/core/SQLite/table.sql
+++ b/modules/t/test-genome-DBs/mus_musculus/core/SQLite/table.sql
@@ -1,6 +1,6 @@
 -- 
 -- Created by SQL::Translator::Producer::SQLite
--- Created on Wed Sep 26 16:19:20 2018
+-- Created on Thu Dec  6 13:50:36 2018
 -- 
 
 BEGIN TRANSACTION;
@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" (
   "analysis_id" smallint
 );
 
-CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id", "analysis_id");
+CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id");
 
 --
 -- Table: "ontology_xref"
diff --git a/modules/t/test-genome-DBs/mus_musculus/core/meta.txt b/modules/t/test-genome-DBs/mus_musculus/core/meta.txt
index eb2fa5dc5f1aebf7a1e8098d51c9c8865ee5dadc..217eb2a8b258c7df2d76af08921c2afca1ef42ab 100644
--- a/modules/t/test-genome-DBs/mus_musculus/core/meta.txt
+++ b/modules/t/test-genome-DBs/mus_musculus/core/meta.txt
@@ -1,5 +1,5 @@
 1	\N	schema_type	core
-2	\N	schema_version	95
+2	\N	schema_version	96
 3	\N	patch	patch_65_66_a.sql|schema_version
 4	\N	patch	patch_65_66_b.sql|fix_external_db_id
 5	\N	patch	patch_65_66_c.sql|reorder_unmapped_obj_index
@@ -181,3 +181,5 @@
 1693	\N	patch	patch_93_94_c.sql|default_aln_type
 1694	\N	patch	patch_94_95_a.sql|schema_version
 1695	\N	patch	patch_94_95_b.sql|vertebrate_division_rename
+1696	\N	patch	patch_94_95_c.sql|ox_key_update
+1697	\N	patch	patch_95_96_a.sql|schema_version
diff --git a/modules/t/test-genome-DBs/mus_musculus/core/table.sql b/modules/t/test-genome-DBs/mus_musculus/core/table.sql
index 339d41e7fed6744012813d2e5236dda29c9ccfa5..4c5fe7f3530de66aa3cb7ce8d6b4c38ffa6b00d0 100644
--- a/modules/t/test-genome-DBs/mus_musculus/core/table.sql
+++ b/modules/t/test-genome-DBs/mus_musculus/core/table.sql
@@ -489,7 +489,7 @@ CREATE TABLE `meta` (
   PRIMARY KEY (`meta_id`),
   UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
   KEY `species_value_idx` (`species_id`,`meta_value`)
-) ENGINE=MyISAM AUTO_INCREMENT=1696 DEFAULT CHARSET=latin1;
+) ENGINE=MyISAM AUTO_INCREMENT=1698 DEFAULT CHARSET=latin1;
 
 CREATE TABLE `meta_coord` (
   `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
@@ -543,7 +543,7 @@ CREATE TABLE `object_xref` (
   `linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL,
   `analysis_id` smallint(5) unsigned DEFAULT NULL,
   PRIMARY KEY (`object_xref_id`),
-  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`,`analysis_id`),
+  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`),
   KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`),
   KEY `analysis_idx` (`analysis_id`)
 ) ENGINE=MyISAM AUTO_INCREMENT=81424 DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
diff --git a/modules/t/test-genome-DBs/mus_musculus/variation/meta.txt b/modules/t/test-genome-DBs/mus_musculus/variation/meta.txt
index a405ae791a67abaf2fb38d02a6bacf185e756181..594761fd3817b85bc27f36b8fd6a22bae05d5840 100644
--- a/modules/t/test-genome-DBs/mus_musculus/variation/meta.txt
+++ b/modules/t/test-genome-DBs/mus_musculus/variation/meta.txt
@@ -1,5 +1,5 @@
 1	\N	schema_type	variation
-2	\N	schema_version	95
+2	\N	schema_version	96
 6	1	species.production_name	mus_musculus
 15	1	web_config	sv_study#Keane 2011 (DGVa study estd118)#Keane 2011#estd118
 14	1	web_config	set#All failed variants#All failed variants#variation_set_fail_all#failed
@@ -61,3 +61,4 @@
 67	\N	patch	patch_93_94_a.sql|schema version
 68	\N	patch	patch_94_95_a.sql|schema version
 69	\N	patch	patch_94_95_b.sql|create table to store allele synonyms
+70	\N	patch	patch_95_96_a.sql|schema_version
diff --git a/modules/t/test-genome-DBs/mus_musculus/variation/table.sql b/modules/t/test-genome-DBs/mus_musculus/variation/table.sql
index aff0d32a9207e43e54e85ad75895669a5acc655f..f686d09c9c4b1045645cc7ad6e3b0b592010532f 100644
--- a/modules/t/test-genome-DBs/mus_musculus/variation/table.sql
+++ b/modules/t/test-genome-DBs/mus_musculus/variation/table.sql
@@ -178,7 +178,7 @@ CREATE TABLE `meta` (
   PRIMARY KEY (`meta_id`),
   UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
   KEY `species_value_idx` (`species_id`,`meta_value`)
-) ENGINE=MyISAM AUTO_INCREMENT=70 DEFAULT CHARSET=latin1;
+) ENGINE=MyISAM AUTO_INCREMENT=71 DEFAULT CHARSET=latin1;
 
 CREATE TABLE `meta_coord` (
   `table_name` varchar(40) NOT NULL,
diff --git a/modules/t/test-genome-DBs/nameless/core/SQLite/table.sql b/modules/t/test-genome-DBs/nameless/core/SQLite/table.sql
index b394259945452b0ebd08ea35269f7f421c7ae013..1472c3bbe7bbbac775afaad71410bcac70a18415 100644
--- a/modules/t/test-genome-DBs/nameless/core/SQLite/table.sql
+++ b/modules/t/test-genome-DBs/nameless/core/SQLite/table.sql
@@ -1,6 +1,6 @@
 -- 
 -- Created by SQL::Translator::Producer::SQLite
--- Created on Wed Sep 26 16:19:27 2018
+-- Created on Thu Dec  6 13:50:47 2018
 -- 
 
 BEGIN TRANSACTION;
@@ -609,7 +609,7 @@ CREATE TABLE "object_xref" (
   "analysis_id" smallint
 );
 
-CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id", "analysis_id");
+CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id");
 
 --
 -- Table: "ontology_xref"
diff --git a/modules/t/test-genome-DBs/nameless/core/meta.txt b/modules/t/test-genome-DBs/nameless/core/meta.txt
index de4753019fa60087fb16122f96de82035c12b29a..a2c00886a3ec403d2e34ffc9f6ed4bf79016566b 100644
--- a/modules/t/test-genome-DBs/nameless/core/meta.txt
+++ b/modules/t/test-genome-DBs/nameless/core/meta.txt
@@ -1,4 +1,4 @@
-1	\N	schema_version	95
+1	\N	schema_version	96
 2	1	assembly.default	NCBI34
 3	1	species.taxonomy_id	9606
 26	1	species.classification	Homo sapiens
@@ -102,3 +102,5 @@
 156	\N	patch	patch_93_94_c.sql|default_aln_type
 157	\N	patch	patch_94_95_a.sql|schema_version
 158	\N	patch	patch_94_95_b.sql|vertebrate_division_rename
+159	\N	patch	patch_94_95_c.sql|ox_key_update
+160	\N	patch	patch_95_96_a.sql|schema_version
diff --git a/modules/t/test-genome-DBs/nameless/core/table.sql b/modules/t/test-genome-DBs/nameless/core/table.sql
index 83e911cce97c76c4513baaa278ddaf2f4d20e8a3..4b35d443ccd289ff0ce830eeadb60f8e26d5355f 100644
--- a/modules/t/test-genome-DBs/nameless/core/table.sql
+++ b/modules/t/test-genome-DBs/nameless/core/table.sql
@@ -479,7 +479,7 @@ CREATE TABLE `meta` (
   PRIMARY KEY (`meta_id`),
   UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
   KEY `species_value_idx` (`species_id`,`meta_value`)
-) ENGINE=MyISAM AUTO_INCREMENT=159 DEFAULT CHARSET=latin1;
+) ENGINE=MyISAM AUTO_INCREMENT=161 DEFAULT CHARSET=latin1;
 
 CREATE TABLE `meta_coord` (
   `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
@@ -533,7 +533,7 @@ CREATE TABLE `object_xref` (
   `linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL,
   `analysis_id` smallint(5) unsigned DEFAULT NULL,
   PRIMARY KEY (`object_xref_id`),
-  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`,`analysis_id`),
+  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`),
   KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`),
   KEY `analysis_idx` (`analysis_id`)
 ) ENGINE=MyISAM AUTO_INCREMENT=81424 DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
diff --git a/modules/t/test-genome-DBs/ontology/ontology/SQLite/table.sql b/modules/t/test-genome-DBs/ontology/ontology/SQLite/table.sql
index 3b70def10e224b1cadd27f08b13594702289efc0..bc6c5d0e4991ad9496c633f972505f192d0a8c32 100644
--- a/modules/t/test-genome-DBs/ontology/ontology/SQLite/table.sql
+++ b/modules/t/test-genome-DBs/ontology/ontology/SQLite/table.sql
@@ -1,6 +1,6 @@
 -- 
 -- Created by SQL::Translator::Producer::SQLite
--- Created on Wed Sep 26 16:19:29 2018
+-- Created on Thu Dec  6 13:50:51 2018
 -- 
 
 BEGIN TRANSACTION;
diff --git a/modules/t/test-genome-DBs/ontology/ontology/meta.txt b/modules/t/test-genome-DBs/ontology/ontology/meta.txt
index bd2acf4b8f4870d608829b59425f42af6d12b63a..9ccb778d1628c36e2159ad1b4e6cee2e535f9b3b 100644
--- a/modules/t/test-genome-DBs/ontology/ontology/meta.txt
+++ b/modules/t/test-genome-DBs/ontology/ontology/meta.txt
@@ -9,7 +9,7 @@
 10	patch	patch_72_73_b.sql|meta	\N
 12	patch	patch_73_74_a.sql|schema_version	\N
 14	patch	patch_74_75_a.sql|schema_version	\N
-15	schema_version	95	\N
+15	schema_version	96	\N
 16	patch	patch_75_76_a.sql|schema_version	\N
 17	patch	patch_76_77_a.sql|schema_version	\N
 18	patch	patch_77_78_a.sql|schema_version	\N
@@ -37,3 +37,4 @@
 40	patch	patch_92_93_a.sql|schema_version	\N
 41	patch	patch_93_94_a.sql|schema_version	\N
 42	patch	patch_94_95_a.sql|schema_version	\N
+43	patch	patch_95_96_a.sql|schema_version	\N
diff --git a/modules/t/test-genome-DBs/ontology/ontology/table.sql b/modules/t/test-genome-DBs/ontology/ontology/table.sql
index 82677513750e7a9a333b03c668615167bef76abc..0895e3789c23f53e80b7ee18b560d99bfb091102 100644
--- a/modules/t/test-genome-DBs/ontology/ontology/table.sql
+++ b/modules/t/test-genome-DBs/ontology/ontology/table.sql
@@ -139,7 +139,7 @@ CREATE TABLE `meta` (
   `species_id` int(1) unsigned DEFAULT NULL,
   PRIMARY KEY (`meta_id`),
   UNIQUE KEY `key_value_idx` (`meta_key`,`meta_value`)
-) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=latin1;
+) ENGINE=MyISAM AUTO_INCREMENT=44 DEFAULT CHARSET=latin1;
 
 CREATE TABLE `ontology` (
   `ontology_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
diff --git a/modules/t/test-genome-DBs/polyploidy/core/SQLite/table.sql b/modules/t/test-genome-DBs/polyploidy/core/SQLite/table.sql
index 7dfc9b96399457931960657cb02abae8211c935c..c6d1438f81a389ae6e2e191c7b4958d8e49bfcdb 100644
--- a/modules/t/test-genome-DBs/polyploidy/core/SQLite/table.sql
+++ b/modules/t/test-genome-DBs/polyploidy/core/SQLite/table.sql
@@ -1,6 +1,6 @@
 -- 
 -- Created by SQL::Translator::Producer::SQLite
--- Created on Wed Sep 26 16:19:36 2018
+-- Created on Thu Dec  6 13:51:01 2018
 -- 
 
 BEGIN TRANSACTION;
@@ -620,7 +620,7 @@ CREATE TABLE "object_xref" (
   "analysis_id" smallint
 );
 
-CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id", "analysis_id");
+CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id");
 
 --
 -- Table: "ontology_xref"
diff --git a/modules/t/test-genome-DBs/polyploidy/core/meta.txt b/modules/t/test-genome-DBs/polyploidy/core/meta.txt
index 2ea02130bd32bebd56160112d78beb53841bbf39..c807cb6d40145d7934934978d457c6958773b7ea 100644
--- a/modules/t/test-genome-DBs/polyploidy/core/meta.txt
+++ b/modules/t/test-genome-DBs/polyploidy/core/meta.txt
@@ -1,5 +1,5 @@
 1	\N	schema_type	core
-2	\N	schema_version	95
+2	\N	schema_version	96
 3	\N	patch	patch_68_69_a.sql|schema_version
 4	1	species.taxonomy_id	4565
 6	1	species.alias	bread wheat
@@ -157,3 +157,5 @@
 237	\N	patch	patch_93_94_c.sql|default_aln_type
 238	\N	patch	patch_94_95_a.sql|schema_version
 239	\N	patch	patch_94_95_b.sql|vertebrate_division_rename
+240	\N	patch	patch_94_95_c.sql|ox_key_update
+241	\N	patch	patch_95_96_a.sql|schema_version
diff --git a/modules/t/test-genome-DBs/polyploidy/core/table.sql b/modules/t/test-genome-DBs/polyploidy/core/table.sql
index d06e568f3ecceb16916499abbe4cefbd0e51d9d2..8020816362fa8769c40767103c1f4242c982ddd6 100644
--- a/modules/t/test-genome-DBs/polyploidy/core/table.sql
+++ b/modules/t/test-genome-DBs/polyploidy/core/table.sql
@@ -489,7 +489,7 @@ CREATE TABLE `meta` (
   PRIMARY KEY (`meta_id`),
   UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
   KEY `species_value_idx` (`species_id`,`meta_value`)
-) ENGINE=MyISAM AUTO_INCREMENT=240 DEFAULT CHARSET=latin1;
+) ENGINE=MyISAM AUTO_INCREMENT=242 DEFAULT CHARSET=latin1;
 
 CREATE TABLE `meta_coord` (
   `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
@@ -543,7 +543,7 @@ CREATE TABLE `object_xref` (
   `linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL,
   `analysis_id` smallint(5) unsigned DEFAULT NULL,
   PRIMARY KEY (`object_xref_id`),
-  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`,`analysis_id`),
+  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`),
   KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`),
   KEY `analysis_idx` (`analysis_id`)
 ) ENGINE=MyISAM AUTO_INCREMENT=81424 DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
diff --git a/modules/t/test-genome-DBs/test_collection/core/SQLite/table.sql b/modules/t/test-genome-DBs/test_collection/core/SQLite/table.sql
index 32e0efec88cac8bef79424d79a16b10473b7fc06..8bba6b272128b6efe5be12825638dcaffb7916f8 100644
--- a/modules/t/test-genome-DBs/test_collection/core/SQLite/table.sql
+++ b/modules/t/test-genome-DBs/test_collection/core/SQLite/table.sql
@@ -1,6 +1,6 @@
 -- 
 -- Created by SQL::Translator::Producer::SQLite
--- Created on Wed Sep 26 16:19:43 2018
+-- Created on Thu Dec  6 13:51:13 2018
 -- 
 
 BEGIN TRANSACTION;
@@ -609,7 +609,7 @@ CREATE TABLE "object_xref" (
   "analysis_id" smallint
 );
 
-CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id", "analysis_id");
+CREATE UNIQUE INDEX "xref_idx" ON "object_xref" ("xref_id", "ensembl_object_type", "ensembl_id");
 
 --
 -- Table: "ontology_xref"
diff --git a/modules/t/test-genome-DBs/test_collection/core/meta.txt b/modules/t/test-genome-DBs/test_collection/core/meta.txt
index 66d756408f7bfcde3802958a0107e62aa05abd30..f16664b06f2a79292c636b9960d92759e7933671 100644
--- a/modules/t/test-genome-DBs/test_collection/core/meta.txt
+++ b/modules/t/test-genome-DBs/test_collection/core/meta.txt
@@ -39,7 +39,7 @@
 190	\N	patch	patch_83_84_c.sql|protein_feature_unique
 191	\N	patch	patch_83_84_d.sql|longer_synonym
 1	\N	schema_type	core
-2	\N	schema_version	95
+2	\N	schema_version	96
 8	1	assembly.accession	GCA_000292705.1
 10	1	assembly.date	2012-08
 7	1	assembly.default	GCA_000292705.1
@@ -177,3 +177,5 @@
 219	\N	patch	patch_93_94_c.sql|default_aln_type
 220	\N	patch	patch_94_95_a.sql|schema_version
 221	\N	patch	patch_94_95_b.sql|vertebrate_division_rename
+222	\N	patch	patch_94_95_c.sql|ox_key_update
+223	\N	patch	patch_95_96_a.sql|schema_version
diff --git a/modules/t/test-genome-DBs/test_collection/core/table.sql b/modules/t/test-genome-DBs/test_collection/core/table.sql
index ea65796015a09cc5dd44c72fef37eb17210afc5f..e2f57aa64473bd356cab7f74ef39f45a7e9f91c6 100644
--- a/modules/t/test-genome-DBs/test_collection/core/table.sql
+++ b/modules/t/test-genome-DBs/test_collection/core/table.sql
@@ -479,7 +479,7 @@ CREATE TABLE `meta` (
   PRIMARY KEY (`meta_id`),
   UNIQUE KEY `species_key_value_idx` (`species_id`,`meta_key`,`meta_value`),
   KEY `species_value_idx` (`species_id`,`meta_value`)
-) ENGINE=MyISAM AUTO_INCREMENT=222 DEFAULT CHARSET=latin1;
+) ENGINE=MyISAM AUTO_INCREMENT=224 DEFAULT CHARSET=latin1;
 
 CREATE TABLE `meta_coord` (
   `table_name` varchar(40) COLLATE latin1_bin NOT NULL DEFAULT '',
@@ -533,7 +533,7 @@ CREATE TABLE `object_xref` (
   `linkage_annotation` varchar(255) COLLATE latin1_bin DEFAULT NULL,
   `analysis_id` smallint(5) unsigned DEFAULT NULL,
   PRIMARY KEY (`object_xref_id`),
-  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`,`analysis_id`),
+  UNIQUE KEY `xref_idx` (`xref_id`,`ensembl_object_type`,`ensembl_id`),
   KEY `ensembl_idx` (`ensembl_object_type`,`ensembl_id`),
   KEY `analysis_idx` (`analysis_id`)
 ) ENGINE=MyISAM AUTO_INCREMENT=81424 DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
diff --git a/sql/patch_95_96_a.sql b/sql/patch_95_96_a.sql
new file mode 100644
index 0000000000000000000000000000000000000000..ae45308d5e0cf35dcae00c4e88221dd86ee46ffe
--- /dev/null
+++ b/sql/patch_95_96_a.sql
@@ -0,0 +1,27 @@
+-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
+-- Copyright [2016-2018] EMBL-European Bioinformatics Institute
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+--      http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+# patch_95_96_a.sql
+#
+# Title: Update schema version.
+#
+# Description:
+#   Update schema_version in meta table to 96.
+
+UPDATE meta SET meta_value='96' WHERE meta_key='schema_version';
+
+# Patch identifier
+INSERT INTO meta (species_id, meta_key, meta_value)
+  VALUES (NULL, 'patch', 'patch_95_96_a.sql|schema_version');
diff --git a/sql/table.sql b/sql/table.sql
index 51eaab949796bf349b725fb43972011da336ed6e..058c144383139555f84276eaad42fdb3c5698129 100755
--- a/sql/table.sql
+++ b/sql/table.sql
@@ -308,19 +308,13 @@ CREATE TABLE IF NOT EXISTS meta (
 # Add schema type and schema version to the meta table.
 INSERT INTO meta (species_id, meta_key, meta_value) VALUES
   (NULL, 'schema_type', 'core'),
-  (NULL, 'schema_version', '95');
+  (NULL, 'schema_version', '96');
 
 # Patches included in this schema file:
 # NOTE: At start of release cycle, remove patch entries from last release.
 # NOTE: Avoid line-breaks in values.
 INSERT INTO meta (species_id, meta_key, meta_value)
-  VALUES (NULL, 'patch', 'patch_94_95_a.sql|schema_version');
-
-INSERT INTO meta (species_id, meta_key, meta_value)
-  VALUES (NULL, 'patch', 'patch_94_95_b.sql|vertebrate_division_rename');
-
-INSERT INTO meta (species_id, meta_key, meta_value)
-  VALUES (NULL, 'patch', 'patch_94_95_c.sql|ox_key_update');
+  VALUES (NULL, 'patch', 'patch_95_96_a.sql|schema_version');
 
 
 /**