--- nodeasblock.install.orig 2009-02-26 14:05:27.000000000 +0100 +++ nodeasblock.install 2009-02-26 14:06:34.000000000 +0100 @@ -18,6 +18,11 @@ 'not null' => TRUE, 'description' => t('Primary Key: Node ID'), ), + 'teaser' => array( + 'type' => 'int', + 'not null' => TRUE, + 'description' => 'Display node as teaser or full node in block', + ), ), 'primary key' => array('nid'), ); @@ -31,6 +36,25 @@ drupal_install_schema('nodeasblock'); } + +/** + * Implementation of hook_update_X + */ +function nodeasblock_update_1() { + $ret = array(); + + // Adding new column in database + db_add_field($ret, 'nodeasblock', 'teaser', array( + 'description' => 'Display node as teaser or full node in block', + 'type' => 'int', + 'not null' => TRUE, + 'default' => 1, + ) + ); + + return $ret; +} + /** * Implementation of hook_uninstall(). * @@ -38,4 +62,5 @@ */ function nodeasblock_uninstall() { drupal_uninstall_schema('nodeasblock'); -} \ Pas de fin de ligne à la fin du fichier. +} +