Index: entityreference.install
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- entityreference.install	(revision fec0e03e0a6b37259d4f41d6f186c99c0e0ff797)
+++ entityreference.install	(revision )
@@ -175,7 +175,55 @@
       db_drop_table('taxonomy_index_tmp');
     }
 
-    $tx_schema = drupal_get_schema('taxonomy_index');
+    $tx_schema = array(
+      'description' => 'Maintains denormalized information about node/term relationships.',
+      'fields' => array(
+        'nid' => array(
+          'description' => 'The {node}.nid this record tracks.',
+          'type' => 'int',
+          'unsigned' => TRUE,
+          'not null' => TRUE,
+          'default' => 0,
+        ),
+        'tid' => array(
+          'description' => 'The term ID.',
+          'type' => 'int',
+          'unsigned' => TRUE,
+          'not null' => TRUE,
+          'default' => 0,
+        ),
+        'sticky' => array(
+          'description' => 'Boolean indicating whether the node is sticky.',
+          'type' => 'int',
+          'not null' => FALSE,
+          'default' => 0,
+          'size' => 'tiny',
+        ),
+        'created' => array(
+          'description' => 'The Unix timestamp when the node was created.',
+          'type' => 'int',
+          'not null' => TRUE,
+          'default'=> 0,
+        ),
+      ),
+      'indexes' => array(
+        'term_node' => array('tid', 'sticky', 'created'),
+        'nid' => array('nid'),
+      ),
+      'foreign keys' => array(
+        'tracked_node' => array(
+          'table' => 'node',
+          'columns' => array('nid' => 'nid'),
+        ),
+        'term' => array(
+          'table' => 'taxonomy_term_data',
+          'columns' => array('tid' => 'tid'),
+        ),
+      ),
+    );
+    // added for sanity - check your return values!
+    if ($tx_schema === false) throw new \Exception('Unable to get taxonomy_index schema');
+    
     db_create_table('taxonomy_index_tmp', $tx_schema);
     $select = db_select('taxonomy_index', 'tx');
     $select->fields('tx', array('nid', 'tid'));
