You are here

function activity_creator_schema in Open Social 10.0.x

Same name and namespace in other branches
  1. 8.9 modules/custom/activity_creator/activity_creator.install \activity_creator_schema()
  2. 8.8 modules/custom/activity_creator/activity_creator.install \activity_creator_schema()
  3. 10.3.x modules/custom/activity_creator/activity_creator.install \activity_creator_schema()
  4. 10.1.x modules/custom/activity_creator/activity_creator.install \activity_creator_schema()
  5. 10.2.x modules/custom/activity_creator/activity_creator.install \activity_creator_schema()

Implements hook_schema().

File

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

Code

function activity_creator_schema() {
  $schema['activity_notification_status'] = [
    'fields' => [
      'uid' => [
        'description' => 'The {user}.uid of user.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
      'aid' => [
        'description' => 'The {activity}.id of activity.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
      'status' => [
        'description' => 'The activity status.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 1,
      ],
    ],
    'indexes' => [
      'ans_uid' => [
        'uid',
      ],
      'ans_aid' => [
        'aid',
      ],
      'ans_uid_aid' => [
        'uid',
        'aid',
      ],
      'ans_status' => [
        'status',
      ],
    ],
  ];
  return $schema;
}