19 declare(strict_types=1);
    34         $this->database = $db;
    49         if ($this->database->tableExists(
'file_data')) {
    50             $this->database->addTableColumn(
    75         if (!$this->database->tableExists(
'file_data')) {
    78         if ($this->database->tableColumnExists(
'file_data', 
'downloads')) {
    82         $this->database->addTableColumn(
    93         $this->database->manipulate(
    95             UPDATE file_data SET downloads = (    96                 SELECT COALESCE(SUM(read_event.read_count), 0) FROM read_event     97                     WHERE read_event.obj_id = file_data.file_id   111         $this->database->insert(
   114                 'module' => [
'text', General::MODULE_NAME],
   115                 'keyword' => [
'text', General::F_SHOW_AMOUNT_OF_DOWNLOADS],
   116                 'value' => [
'text', 
'1'],
   127         if (!$this->database->tableExists(IconDatabaseRepository::ICON_TABLE_NAME)) {
   128             $this->database->createTable(
   129                 IconDatabaseRepository::ICON_TABLE_NAME,
   131                     IconDatabaseRepository::ICON_RESOURCE_IDENTIFICATION => [
   137                     IconDatabaseRepository::ICON_ACTIVE => [
   143                     IconDatabaseRepository::IS_DEFAULT_ICON => [
   152         if (!$this->database->tableExists(IconDatabaseRepository::SUFFIX_TABLE_NAME)) {
   153             $this->database->createTable(
   154                 IconDatabaseRepository::SUFFIX_TABLE_NAME,
   156                     IconDatabaseRepository::ICON_RESOURCE_IDENTIFICATION => [
   162                     IconDatabaseRepository::SUFFIX => [
   177         $this->database->manipulate(
   178             "UPDATE il_file_icon_suffixes SET suffix = REPLACE(suffix, 'icon_file_', '') WHERE suffix LIKE 'icon_file_%';"   189         if (!$this->database->tableExists(
'file_data')) {
   192         if ($this->database->tableColumnExists(
   198         $this->database->addTableColumn(
   217         $query = 
"UPDATE `object_data` SET `offline` = 0 WHERE `type` = \"file\" AND `offline` IS NULL";
   218         $this->database->manipulate($query);
   229         if (null === $this->database) {
   230             throw new LogicException(self::class . 
"::prepare() must be called before db-update-steps execution.");
 step_4()
adds two new tables to store data concerning suffix-specific icons for files 
 
step_7()
This step sets all files which were created before the "centralizing online/offline status" feature t...
 
step_2()
adds a new table column called 'downloads' which is used to keep track of the actual amount of downlo...
 
abortIfNotPrepared()
Halts the execution of these update steps if no database was provided. 
 
step_6()
Adds a new table column called 'important_info' to store important information regarding a file such ...
 
const CLICK_MODE_DOWNLOAD
 
prepare(ilDBInterface $db)
 
step_3()
sets the default visibility of the amount of downloads to visible ('1' or true). 
 
step_1()
adds a new table column called 'direct_download' that is used to determine if the on-click action in ...