diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-04-24 08:23:02 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-04-24 08:23:02 +0000 |
commit | 6e334892f2df1f744bdc305570b82f79b2a6cfd2 (patch) | |
tree | bd28ef6048e5b046775cd09275dd8af230d649ac /modules/node/node.install | |
parent | e99838fbf488d9bca18f56e7ea6aee32d563ab68 (diff) | |
download | brdo-6e334892f2df1f744bdc305570b82f79b2a6cfd2.tar.gz brdo-6e334892f2df1f744bdc305570b82f79b2a6cfd2.tar.bz2 |
- Patch #440768 by Dave Reid: move {node_counter} table from node module to statistics module.
Diffstat (limited to 'modules/node/node.install')
-rw-r--r-- | modules/node/node.install | 53 |
1 files changed, 15 insertions, 38 deletions
diff --git a/modules/node/node.install b/modules/node/node.install index b1ab08d64..11ced749a 100644 --- a/modules/node/node.install +++ b/modules/node/node.install @@ -174,42 +174,6 @@ function node_schema() { 'primary key' => array('nid', 'gid', 'realm'), ); - $schema['node_counter'] = array( - 'description' => 'Access statistics for {node}s.', - 'fields' => array( - 'nid' => array( - 'description' => 'The {node}.nid for these statistics.', - 'type' => 'int', - 'not null' => TRUE, - 'default' => 0, - ), - 'totalcount' => array( - 'description' => 'The total number of times the {node} has been viewed.', - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - 'size' => 'big', - ), - 'daycount' => array( - 'description' => 'The total number of times the {node} has been viewed today.', - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - 'size' => 'medium', - ), - 'timestamp' => array( - 'description' => 'The most recent time the {node} has been viewed.', - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - ), - ), - 'primary key' => array('nid'), - ); - $schema['node_revision'] = array( 'description' => 'Stores information about each saved version of a {node}.', 'fields' => array( @@ -382,7 +346,8 @@ function node_schema() { } /** - * Drupal 6.x to 7.x updates + * @defgroup updates-6.x-to-7.x System updates from 6.x to 7.x + * @{ */ /** @@ -417,5 +382,17 @@ function node_update_7002() { } /** - * End of 6.x to 7.x updates + * Remove the node_counter if the statistics module is uninstalled. + */ +function node_update_7003() { + $ret = array(); + if (!drupal_get_installed_schema_version('statistics')) { + db_drop_table($ret, 'node_counter'); + } + return $ret; +} + +/** + * @} End of "defgroup updates-6.x-to-7.x" + * The next series of updates should start at 8000. */ |