38                                        : void
   39    {
   41 
   43 
   44        if (!
$ilDB->tableExists(self::$tbl_userconfig)) {
 
   45            $fields = array(
   46                'usr_id' => array('type' => 'integer', 'notnull' => true, 'length' => 4),
   47                'module' => array('type' => 'text'   , 'notnull' => true, 'length' => 100),
   48                'channel' => array('type' => 'text'   , 'notnull' => true, 'length' => 100),
   49            );
   50            $ilDB->createTable(self::$tbl_userconfig, $fields);
 
   51            $ilDB->addPrimaryKey(self::$tbl_userconfig, array(
'usr_id', 
'module', 
'channel'));
 
   52        }
   53 
   54        if (!
$ilDB->tableExists(self::$tbl_userlistener)) {
 
   55            $fields = array(
   56                'usr_id' => array('type' => 'integer', 'notnull' => true, 'length' => 4),
   57                'module' => array('type' => 'text'   , 'notnull' => true, 'length' => 100),
   58                'sender_id' => array('type' => 'integer', 'notnull' => true, 'length' => 4),
   59                'disabled' => array('type' => 'integer', 'notnull' => true, 'length' => 1),
   60            );
   61            $ilDB->createTable(self::$tbl_userlistener, $fields);
 
   62            $ilDB->addPrimaryKey(self::$tbl_userlistener, array(
'usr_id', 
'module', 
'sender_id'));
 
   63        }
   64 
   65        if (!
$ilDB->tableExists(self::$tbl_notification_data)) {
 
   66            $fields = array(
   67                'notification_id' => array('type' => 'integer', 'notnull' => true, 'length' => 4),
   68                'serialized' => array('type' => 'text'   , 'notnull' => true, 'length' => 4000),
   69            );
   70            $ilDB->createTable(self::$tbl_notification_data, $fields);
 
   71            $ilDB->addPrimaryKey(self::$tbl_notification_data, array(
'notification_id'));
 
   72 
   73            $ilDB->createSequence(self::$tbl_notification_data);
 
   74        }
   75 
   76        if (!
$ilDB->tableExists(self::$tbl_notification_queue)) {
 
   77            $fields = array(
   78                'notification_id' => array('type' => 'integer'  , 'notnull' => true, 'length' => 4),
   79                'usr_id' => array('type' => 'integer'  , 'notnull' => true, 'length' => 4),
   80                'valid_until' => array('type' => 'integer'  , 'notnull' => true, 'length' => 4),
   81            );
   82            $ilDB->createTable(self::$tbl_notification_queue, $fields);
 
   83            $ilDB->addPrimaryKey(self::$tbl_notification_queue, array(
'notification_id', 
'usr_id'));
 
   84        }
   85 
   86        if (!
$ilDB->tableExists(self::$tbl_notification_osd_handler)) {
 
   87            $fields = array(
   88                'notification_osd_id' => array('type' => 'integer'  , 'notnull' => true, 'length' => 4),
   89                'usr_id' => array('type' => 'integer'  , 'notnull' => true, 'length' => 4),
   90                'serialized' => array('type' => 'text'     , 'notnull' => true, 'length' => 4000),
   91                'valid_until' => array('type' => 'integer'  , 'notnull' => true, 'length' => 4),
   92                'time_added' => array('type' => 'integer'  , 'notnull' => true, 'length' => 4),
   93                'type' => array('type' => 'text'     , 'notnull' => true, 'length' => 100),
   94            );
   95            $ilDB->createTable(self::$tbl_notification_osd_handler, $fields);
 
   96 
   97            $ilDB->addPrimaryKey(self::$tbl_notification_osd_handler, array(
'notification_osd_id'));
 
   98 
   99            $ilDB->createSequence(self::$tbl_notification_osd_handler);
 
  100        }
  101 
  102        if (!
$ilDB->tableExists(self::$tbl_notification_channels)) {
 
  103            $fields = array(
  104                'channel_name' => array('type' => 'text', 'notnull' => true, 'length' => 100),
  105                'title' => array('type' => 'text', 'notnull' => true, 'length' => 100),
  106                'description' => array('type' => 'text', 'notnull' => true, 'length' => 4000),
  107                'class' => array('type' => 'text', 'notnull' => true, 'length' => 100),
  108                'include' => array('type' => 'text', 'notnull' => true, 'length' => 100),
  109                'config_type' => array('type' => 'text', 'notnull' => true, 'length' => 30),
  110            );
  111            $ilDB->createTable(self::$tbl_notification_channels, $fields);
 
  112 
  113            $ilDB->addPrimaryKey(self::$tbl_notification_channels, array(
'channel_name'));
 
  114 
  115            self::registerChannel(
$ilDB, 
'mail', 
'mail', 
'mail_desc', 
'ilNotificationMailHandler', 
'Services/Notifications/classes/class.ilNotificationMailHandler.php');
 
  116            self::registerChannel(
$ilDB, 
'osd', 
'osd', 
'osd_desc', 
'ilNotificationOSDHandler', 
'Services/Notifications/classes/class.ilNotificationOSDHandler.php');
 
  117        }
  118 
  119        if (!
$ilDB->tableExists(self::$tbl_notification_types)) {
 
  120            $fields = array(
  121                'type_name' => array('type' => 'text', 'notnull' => true, 'length' => 100),
  122                'title' => array('type' => 'text', 'notnull' => true, 'length' => 100),
  123                'description' => array('type' => 'text', 'notnull' => true, 'length' => 100),
  124                'notification_group' => array('type' => 'text', 'notnull' => true, 'length' => 100),
  125                'config_type' => array('type' => 'text', 'notnull' => true, 'length' => 30),
  126            );
  127            $ilDB->createTable(self::$tbl_notification_types, $fields);
 
  128            $ilDB->addPrimaryKey(self::$tbl_notification_types, array(
'type_name'));
 
  129 
  132        }
  133    }
static registerChannel(ilDBInterface $db, string $name, string $title, string $description, string $class, string $classfile, string $config_type='set_by_user')
 
static registerType(ilDBInterface $db, string $name, string $title, string $description, string $notification_group, string $config_type='set_by_user')