function activity_creator_update_8001 in Open Social 10.1.x
Same name and namespace in other branches
- 8.9 modules/custom/activity_creator/activity_creator.install \activity_creator_update_8001()
- 8.8 modules/custom/activity_creator/activity_creator.install \activity_creator_update_8001()
- 10.3.x modules/custom/activity_creator/activity_creator.install \activity_creator_update_8001()
- 10.0.x modules/custom/activity_creator/activity_creator.install \activity_creator_update_8001()
- 10.2.x modules/custom/activity_creator/activity_creator.install \activity_creator_update_8001()
Create new database table {activity_notification_status}.
File
- modules/
custom/ activity_creator/ activity_creator.install, line 62 - Installation code for the activity_creator module.
Code
function activity_creator_update_8001() {
$spec['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',
],
],
];
$db = Database::getConnection();
$schema = $db
->schema();
$schema
->createTable('activity_notification_status', $spec['activity_notification_status']);
}