You are here

function activity_send_schema in Open Social 8.2

Same name and namespace in other branches
  1. 8.9 modules/custom/activity_send/activity_send.install \activity_send_schema()
  2. 8 modules/custom/activity_send/activity_send.install \activity_send_schema()
  3. 8.3 modules/custom/activity_send/activity_send.install \activity_send_schema()
  4. 8.4 modules/custom/activity_send/activity_send.install \activity_send_schema()
  5. 8.5 modules/custom/activity_send/activity_send.install \activity_send_schema()
  6. 8.6 modules/custom/activity_send/activity_send.install \activity_send_schema()
  7. 8.7 modules/custom/activity_send/activity_send.install \activity_send_schema()
  8. 8.8 modules/custom/activity_send/activity_send.install \activity_send_schema()
  9. 10.3.x modules/custom/activity_send/activity_send.install \activity_send_schema()
  10. 10.0.x modules/custom/activity_send/activity_send.install \activity_send_schema()
  11. 10.1.x modules/custom/activity_send/activity_send.install \activity_send_schema()
  12. 10.2.x modules/custom/activity_send/activity_send.install \activity_send_schema()

Implements hook_schema().

File

modules/custom/activity_send/activity_send.install, line 13
Installation code for the activity_send module.

Code

function activity_send_schema() {
  $schema['user_activity_send'] = [
    'fields' => [
      'uid' => [
        'description' => 'The {user}.uid of user.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
      'destination' => [
        'description' => 'The activity destination name.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ],
      'message_template' => [
        'description' => 'The message template name.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ],
      'frequency' => [
        'description' => 'The frequency the emails should be sent. It should match the EmailFrequency plugin id.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => 'immediately',
      ],
    ],
    'indexes' => [
      'uas_uid' => [
        'uid',
      ],
      'uas_destination' => [
        'destination',
      ],
      'uas_message_template' => [
        'message_template',
      ],
      'uas_frequency' => [
        'frequency',
      ],
    ],
  ];
  return $schema;
}