'blob', 'size' => 'big')); } /** * Implementation of hook_uninstall(). */ function form_manager_uninstall() { drupal_uninstall_schema('form_manager'); $result = db_query("SELECT name FROM {variable} WHERE name LIKE 'form_manager_%'"); while ($row = db_fetch_object($result)) { variable_del($row->name); } } /** * Implementation of hook_schema(). */ function form_manager_schema() { $schema = array(); $schema['form_manager_forms'] = array( 'fields' => array( 'fid' => array( 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, ), 'form_id' => array( 'type' => 'varchar', 'length' => '32', 'not null' => FALSE, ), 'type' => array( 'type' => 'varchar', 'length' => '32', 'not null' => FALSE, ), 'path' => array( 'type' => 'varchar', 'length' => '64', 'not null' => FALSE, ), 'status' => array( 'description' => 'Boolean indicating whether the form is published (visible to non-administrators).', 'type' => 'int', 'not null' => TRUE, 'default' => 1, 'size' => 'tiny', ), 'multistep' => array( 'description' => 'Boolean indicating whether the form should be treated as a multi-step form based on fieldsets).', 'type' => 'int', 'not null' => TRUE, 'default' => 1, 'size' => 'tiny', ), 'updated' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10', ), 'data' => array( 'type' => 'text', 'size' => 'medium', 'not null' => FALSE, ), ), 'export' => array( 'key' => 'fid', 'identifier' => 'formmanager', 'default hook' => 'form_manager_formmanager', // Function hook name. 'api' => array( 'owner' => 'form_manager', 'api' => 'form_manager_formmanager', // Base name for api include files. 'minimum_version' => 1, 'current_version' => 1, ), ), 'primary key' => array('fid'), 'unique keys' => array( 'form_id' => array('form_id'), ), 'indexes' => array( 'name' => array('form_id'), 'obj_name' => array('type', 'form_id'), 'updated' => array('updated'), ), ); $schema['form_manager_settings'] = array( 'fields' => array( 'sid' => array( 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, ), 'form_id' => array( 'type' => 'varchar', 'length' => '32', 'not null' => FALSE, ), 'path' => array( 'type' => 'varchar', 'length' => '64', 'not null' => FALSE, ), 'status' => array( 'description' => 'Boolean indicating whether the form is published (visible to non-administrators).', 'type' => 'int', 'not null' => TRUE, 'default' => 1, 'size' => 'tiny', ), 'multistep' => array( 'description' => 'Boolean indicating whether the form should be treated as a multi-step form based on fieldsets).', 'type' => 'int', 'not null' => TRUE, 'default' => 1, 'size' => 'tiny', ), 'updated' => array( 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10', ), ), 'primary key' => array('sid'), 'unique keys' => array( 'form_id' => array('form_id'), ), 'indexes' => array( 'name' => array('form_id'), 'updated' => array('updated'), ), ); return $schema; }