summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Barth2009-10-15 20:08:37 (GMT)
committer Alex Barth2009-10-15 20:08:37 (GMT)
commit475d6a95a6e3e511f93e95df251e52af817ca367 (patch)
tree080d7b47f01b93281094016a8b363c41646dcf88
parent1e0527126148bdede488bbfbd2850597ad345753 (diff)
Add index to name and id.
-rw-r--r--data_node/data_node.install10
1 files changed, 10 insertions, 0 deletions
diff --git a/data_node/data_node.install b/data_node/data_node.install
index 50f41f5..8fa8e38 100644
--- a/data_node/data_node.install
+++ b/data_node/data_node.install
@@ -36,6 +36,7 @@ function data_node_schema() {
'nid' => array('nid'),
'data_table_name' => array('data_table_name'),
'id' => array('id'),
+ 'name_id' => array('data_table_name', 'id'),
),
'primary key' => array('nid', 'data_table_name', 'id'),
);
@@ -54,4 +55,13 @@ function data_node_install() {
*/
function data_node_uninstall() {
drupal_uninstall_schema('data_node');
+}
+
+/**
+ * Add an index to id and name.
+ */
+function data_node_update_6001() {
+ $ret = array();
+ db_add_index($ret, 'data_table_node', 'name_id', array('data_table_name', 'id'));
+ return $ret;
} \ No newline at end of file