t('Table storing preset definitions.'), 'export' => array( 'key' => 'name', 'identifier' => 'preset', // Exports will be defined as $preset 'default hook' => 'default_editablefields_preset', // Function hook name. 'api' => array( 'owner' => 'editablefields', 'api' => 'default_editablefields_presets', // Base name for api include files. 'minimum_version' => 1, 'current_version' => 1, ), ), 'fields' => array( 'name' => array( 'type' => 'varchar', 'length' => '255', 'description' => 'Unique ID for presets. Used to identify them programmatically.', ), 'pid' => array( 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, 'description' => 'Primary ID field for the table. Not used for anything except internal lookups.', 'no export' => TRUE, // Do not export database-only keys. ), 'description' => array( 'type' => 'varchar', 'length' => '255', 'description' => 'A human readable name of a preset.', ), 'config' => array( 'type' => 'text', 'size' => 'big', 'description' => 'Configuration data.', ), ), 'primary key' => array('pid'), 'unique keys' => array( 'name' => array('name'), ), ); return $schema; } /** * Implementation of hook_install(). */ function editablefields_install() { drupal_install_schema('editablefields'); } /** * Implementation of hook_install(). */ function editablefields_uninstall() { drupal_uninstall_schema('editablefields'); } /** * Update to the 6.x-3.x branch. */ function editablefields_update_6000() { $ret = array(); // Check the new dependency on Ctools. if (!module_exists('ctools')) { $ret['#abort'] = array('success' => FALSE, 'query' => 'Editablefields 6.x-3.x requires the Ctools module. No updates were run.'); return $ret; } $ret[] = array( 'success' => TRUE, 'query' => t('Installing schema.'), ); // install schema $schema_ret = drupal_install_schema('editablefields'); $ret = array_merge($ret, $schema_ret); return $ret; }