diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-10-16 03:40:40 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-10-16 03:40:40 +0000 |
commit | 92f5a844b25e7855691a9338f9466e8f5c9a07af (patch) | |
tree | 2f818e9071c7e1872bb507737fc112dd244f9896 /modules/comment/comment.install | |
parent | 087a47ba5c8cdf5b0f79d9a121b7b9dcbbe7e992 (diff) | |
download | brdo-92f5a844b25e7855691a9338f9466e8f5c9a07af.tar.gz brdo-92f5a844b25e7855691a9338f9466e8f5c9a07af.tar.bz2 |
#605862 by andypost, peximo, sun: Store language for comments.
Diffstat (limited to 'modules/comment/comment.install')
-rw-r--r-- | modules/comment/comment.install | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/modules/comment/comment.install b/modules/comment/comment.install index 454d6e16a..272c50944 100644 --- a/modules/comment/comment.install +++ b/modules/comment/comment.install @@ -159,6 +159,22 @@ function comment_update_7007() { } /** + * Add language column to the {comment} table. + */ +function comment_update_7008() { + // Create a language column. + db_add_field('comment', 'language', array( + 'type' => 'varchar', + 'length' => 12, + 'not null' => TRUE, + 'default' => '', + )); + + // Create the index. + db_add_index('comment', 'comment_nid_language', array('nid', 'language')); +} + +/** * @} End of "defgroup updates-6.x-to-7.x" * The next series of updates should start at 8000. */ @@ -263,12 +279,20 @@ function comment_schema() { 'length' => 255, 'not null' => FALSE, 'description' => "The comment author's home page address from the comment form, if user is anonymous, and the 'Anonymous users may/must leave their contact information' setting is turned on.", - ) + ), + 'language' => array( + 'description' => 'The {languages}.language of this comment.', + 'type' => 'varchar', + 'length' => 12, + 'not null' => TRUE, + 'default' => '', + ), ), 'indexes' => array( 'comment_status_pid' => array('pid', 'status'), 'comment_num_new' => array('nid', 'changed', 'status'), 'comment_uid' => array('uid'), + 'comment_nid_language' => array('nid', 'language'), ), 'primary key' => array('cid'), 'foreign keys' => array( |