3 * Implementation of hook_install().
5 function cck_install() {
10 * Implementation of hook_uninstall().
12 function cck_uninstall() {
13 db_query("DELETE FROM {variable} WHERE name LIKE 'cck_extra_weights_%'");
17 * Implementation of hook_schema.
19 * Create a table to hold data for field settings CCK is managing,
20 * like custom PHP code for Allowed values and default values that we
23 function cck_schema() {
25 $schema['cck_field_settings'] = array(
27 'field_name' => array(
31 'description' => 'The name of the field.',
33 'entity_type' => array(
38 'description' => 'The name of the entity type, NULL for field settings.',
44 'description' => 'The name of the bundle, NULL for field settings.',
50 'description' => 'The name of the language, NULL for field settings.',
52 'setting_type' => array(
56 'description' => 'The type of setting that CCK is managing (field, instance, widget, display).',
62 'description' => 'The name of the setting that CCK is managing (default_value_php, allowed_values_php, etc).',
64 'setting_option' => array(
68 'description' => 'The custom value for this setting.',
75 function cck_update_7000() {
76 if (!db_field_exists('cck_field_settings', 'entity_type')) {
82 'description' => 'The name of the entity type, NULL for field settings.',
84 db_add_field('cck_field_settings', 'entity_type', $field);
86 if (!db_field_exists('cck_field_settings', 'language')) {
91 'description' => 'The name of the language, NULL for field settings.',
93 db_add_field('cck_field_settings', 'language', $field);