--- nodeorder-6.x/nodeorder.install	2009-01-04 19:45:48.000000000 -0600
+++ nodeorder-6.x-2/nodeorder.install	2009-01-05 05:38:49.000000000 -0600
@@ -1,26 +1,43 @@
 <?php
 // $Id: nodeorder.install,v 1.1 2006/09/30 23:10:36 marcp Exp $
 
+/**
+ * Implementation of hook_install()
+ *
+ * Adds field 'weight_in_tid' to core table 'term_node'.
+ */
 function nodeorder_install() {
-  // Create my tables.
-  $retval = drupal_install_schema('nodeorder');
-  
-  if ($retval['success'] == TRUE) {
-    db_query("UPDATE {system} SET weight = 5 WHERE name = 'nodeorder' AND type = 'module'");
-  }
-}
+  // Set field properties
+  $spec =  array(
+    'type' => 'int',
+    'signed' => TRUE,
+    'not null' => TRUE,
+    'default' => 0,
+    'initial' => 0,
+    'description' => t('A user-defined weight for each node in its respective category.')
+  );
 
-function nodeorder_uninstall() {
-  // Drop my tables.
-  drupal_uninstall_schema('nodeorder');
+  // Create an index for 'weight_in_tid'
+  $keys['indexes'] = array('weight_in_tid' => array('weight_in_tid'));
+
+  // Add the column to the table
+  $ret = array();
+  db_add_field($ret, 'term_node', 'weight_in_tid', $spec, $keys);
 }
 
+/**
+ * Implementation of hook_schema_alter()
+ *
+ * Informs drupal_get_schema() of the field addition to 'term_node'.
+ */
 function nodeorder_schema_alter(&$schema) {
   $schema['term_node']['fields']['weight_in_tid'] = array(
     'type' => 'int',
+    'signed' => TRUE,
     'not null' => TRUE,
     'default' => 0,
-    'signed' => TRUE
+    'initial' => 0,
+    'description' => t('A user-defined weight for each node in its respective category.'),
   );
 }
 
@@ -33,9 +50,9 @@
  */
 function nodeorder_update_6100() {
   $ret = array();
-  
+
   // change field to a SIGNED int
   db_change_field($ret, 'term_node', 'weight_in_tid', 'weight_in_tid', array('signed' => TRUE));
-  
+
   return $ret;
 }
