Index: wysiwyg.admin.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/wysiwyg.admin.inc,v retrieving revision 1.24 diff -u -p -r1.24 wysiwyg.admin.inc --- wysiwyg.admin.inc 18 Oct 2010 21:57:48 -0000 1.24 +++ wysiwyg.admin.inc 24 Oct 2010 21:22:31 -0000 @@ -13,7 +13,7 @@ function wysiwyg_profile_form($form, &$f // Merge in defaults. $profile = (array) $profile; $profile += array( - 'format' => 0, + 'format' => '', 'editor' => '', ); if (empty($profile['settings'])) { Index: wysiwyg.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/wysiwyg.install,v retrieving revision 1.7 diff -u -p -r1.7 wysiwyg.install --- wysiwyg.install 10 Sep 2010 00:39:16 -0000 1.7 +++ wysiwyg.install 24 Oct 2010 21:22:31 -0000 @@ -8,7 +8,7 @@ function wysiwyg_schema() { $schema['wysiwyg'] = array( 'description' => t('Stores Wysiwyg profiles.'), 'fields' => array( - 'format' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), + 'format' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE), 'editor' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''), 'settings' => array('type' => 'text', 'size' => 'normal'), ), @@ -163,3 +163,28 @@ function wysiwyg_update_6200() { return $ret; } +/** + * Implementation of hook_update_dependencies(). + */ +function wysiwyg_update_dependencies() { + // Ensure that format columns are only changed after Filter module has changed + // the primary records. + $dependencies['wysiwyg'][7000] = array( + 'filter' => 7010, + ); + + return $dependencies; +} + +/** + * Change {wysiwyg}.format into a string. + */ +function wysiwyg_update_7000() { + db_drop_primary_key('wysiwyg'); + db_change_field('wysiwyg', 'format', 'format', array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + )); + db_add_primary_key('wysiwyg', array('format')); +}