diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-01-21 14:42:16 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-01-21 14:42:16 +0000 |
commit | b20de4c1c97ee01fca20e7703b1bcf4f0e714667 (patch) | |
tree | 6c1560357e8c88b130cbab93e0ebaf1663333157 /modules/poll/poll.install | |
parent | daf4acf2bec7324069b1e80071f4a596b8067757 (diff) | |
download | brdo-b20de4c1c97ee01fca20e7703b1bcf4f0e714667.tar.gz brdo-b20de4c1c97ee01fca20e7703b1bcf4f0e714667.tar.bz2 |
- Patch #360785 by Dave Reid: add timestamp to {poll_votes}.
Diffstat (limited to 'modules/poll/poll.install')
-rw-r--r-- | modules/poll/poll.install | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/poll/poll.install b/modules/poll/poll.install index b560aad0b..04b7ad5a5 100644 --- a/modules/poll/poll.install +++ b/modules/poll/poll.install @@ -120,6 +120,12 @@ function poll_schema() { 'default' => '', 'description' => 'The IP address this vote is from unless the voter was logged in.', ), + 'timestamp' => array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + 'description' => 'The timestamp of the vote creation.', + ), ), 'primary key' => array('nid', 'uid', 'hostname'), 'indexes' => array( @@ -141,3 +147,17 @@ function poll_update_7001() { db_rename_table($ret, 'poll_votes', 'poll_vote'); return $ret; } + +/** + * Add timestamp field to {poll_votes}. + */ +function poll_update_7002() { + $ret = array(); + $field = array( + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + ); + db_add_field($ret, 'poll_votes', 'timestamp', $field); + return $ret; +} |