You are here

function registration_update_7200 in Entity Registration 7.2

Add registrant entity fields to the registration_type table

File

./registration.install, line 650
Schema and installation hooks for registration module.

Code

function registration_update_7200(&$sandbox) {
  if (!db_field_exists('registration_type', 'registrant_entity_type')) {
    db_add_field('registration_type', 'registrant_entity_type', array(
      'type' => 'varchar',
      'length' => 128,
      'not null' => TRUE,
      'default' => 'user',
      'description' => 'The machine name of the registrant entity\'s type.',
    ));
  }
  if (!db_field_exists('registration_type', 'registrant_bundle')) {
    db_add_field('registration_type', 'registrant_bundle', array(
      'type' => 'varchar',
      'length' => 128,
      'not null' => TRUE,
      'default' => 'user',
      'description' => 'The machine name of the registrant entity\'s bundle.',
    ));
  }
  if (!db_field_exists('registration_type', 'registrant_email_property')) {
    db_add_field('registration_type', 'registrant_email_property', array(
      'type' => 'varchar',
      'length' => 128,
      'not null' => TRUE,
      'default' => 'mail',
      'description' => 'The machine name of the registrant entity\'s email property.',
    ));
  }
}