Index: block_class.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/block_class/block_class.install,v
retrieving revision 1.8.2.3
diff -u -p -r1.8.2.3 block_class.install
--- block_class.install	9 Jan 2011 22:42:54 -0000	1.8.2.3
+++ block_class.install	12 Jan 2011 15:58:51 -0000
@@ -18,22 +18,25 @@ function block_class_schema() {
         'type' => 'varchar',
         'length' => '255',
         'not null' => TRUE,
+        'default' => '',
         'description' => 'The module to which the block belongs.',
       ),
       'delta' => array(
         'type' => 'varchar',
         'length' => '255',
         'not null' => TRUE,
+        'default' => '',
         'description' => "The ID of the module's block.",
       ),
       'css_class' => array(
         'type' => 'varchar',
         'length' => '255',
         'not null' => TRUE,
+        'default' => '',
         'description' => 'String containing the classes for the block.',
       ),
     ),
-    'primary key' => array('module', 'delta'),
+    'primary key' => array(array('module', 128), array('delta', 128)),
   );
 
   return $schema;
@@ -43,53 +46,44 @@ function block_class_schema() {
 /**
  * Implementation of hook_update_N(). Alters the structure of the
  * block_class schema.
- *
- * @return array The results of the updates.
- * 
- * @todo Make this update function work for Drupal 6.x->7.x updates.
- * This schema change was added to the 6.x-1.x-dev branch *after* 7.x-1.x-dev
- * was created.
- * 
- * @see http://drupal.org/node/1020790
  */
-
-/*
-function block_class_update_6100() {
-  $status = array();
-
+function block_class_update_7100(&$sandbox) {
   // Update the schema.
-  db_drop_primary_key($status, 'block_class');
+  db_drop_primary_key('block_class');
 
-  db_change_field($status, 'block_class', 'module', 'module',
+  db_change_field('block_class', 'module', 'module',
     array(
       'type' => 'varchar',
       'length' => '255',
       'not null' => TRUE,
+      'default' => '',
       'description' => t('The module to which the block belongs.'),
     )
   );
 
-  db_change_field($status, 'block_class', 'delta', 'delta',
+  db_change_field('block_class', 'delta', 'delta',
     array(
       'type' => 'varchar',
       'length' => '255',
       'not null' => TRUE,
+      'default' => '',
       'description' => t("The ID of the module's block."),
     )
   );
 
-  db_change_field($status, 'block_class', 'css_class', 'css_class',
+  db_change_field('block_class', 'css_class', 'css_class',
     array(
       'type' => 'varchar',
-      'size' => '255',
+      'length' => '255',
       'not null' => TRUE,
+      'default' => '',
       'description' => t('String containing the classes for the block.'),
     )
   );
 
   // Restore the primary key.
-  db_add_primary_key($status, 'block_class', array('module', 'delta'));
+  db_add_primary_key('block_class', array(array('module', 128), array('delta',128)));
 
   return $status;
 }
-*/
+
