1

I need to write a module that need to handle user related details.

I'm able to create the module and add the necessary database changes in 'users_field_data' table. By using db_add_field in hook_install()

db_add_field('users_field_data', 'user_office', array(
            'type' => 'varchar',
            'length' => 255,
            'not null' => FALSE,
        ));

But one thing I noticed when installing some other standard module from drupal, when a new field is added to the database it saves some values to 'config' table and 'key_value'table. But when I install the module it only insert the fields to 'users_field_data' table.

Is there a way that I add the values to 'config' table and 'key_value' table when creating a new field in an existing table.

0

0

Browse other questions tagged or ask your own question.