WIKINDX API trunk

UPDATEDATABASE
in package

UPDATEDATABASE

Update the database as required

Table of Contents

Properties

$browserTabID  : mixed
bool
$db  : mixed
object
$endStepMessage  : mixed
string
$interruptStepMessage  : mixed
string
$oldTime  : mixed
int
$session  : mixed
object
$targetVersion  : mixed
float

Methods

checkConfigFile()  : mixed
Check permissions on config.php
CheckDatabaseEngineVersion()  : bool
Check if the MySql/MariaDB engine version is right
copyBibContents()  : mixed
Copy non-official bibliographic styles (if they exist)
copyFolderContents()  : mixed
Copy folder contents Code modified from: https://stackoverflow.com/questions/2082138/move-all-files-in-a-folder-to-another
copyWpContents()  : mixed
Copy and update papers in the word processor plugin (if it/they exist)
correctCreators()  : mixed
Fix creator errors In some cases, 'resourcecreatorCreatorSurname' does not match the id in resourcecreatorCreatorMain
correctDatetimeFields()  : mixed
Correct anomalies in the datetime fields Рthere should be no occurrence of '0000-00-00 00:00:00' as a value.
correctIndices()  : mixed
Correct parameters of indices that are varchars by ensuring they have a limited prefix of (100)
createSuperAdmin()  : mixed
Intercept for initial configuration by admin and, if necessary, display admin configuration interface (new installation means users table is empty).
displayUpdatePreambule()  : mixed
Check and print status of update scripts
endDisplay()  : mixed
End to emit the HTML page of the upgrade process
flushTempStorage()  : mixed
Flush the temp_storage table (NB old form and new form)
intervalVersion2publicVersion()  : string
Get the minimum public version corresponding to an internal version
pauseUpdateDisplay()  : mixed
End an upgrade step by displaying a message and a form
removeOldTablePrefix()  : string
Return a table name without the old prefix wkx_
renameTable()  : mixed
Rename a table
requestSuperAdminLogin()  : mixed
Only the superadmin may update the database -- ask for login
rewriteConfigFile()  : mixed
Write new config.php with upgrade to >= WIKINDX v6.4.2
startDisplayCode()  : string
Return the common code for the HTML display of the install/updage process
startInstallDisplay()  : mixed
Start to emit the HTML page of the install process
startUpdateDisplay()  : mixed
Start to emit the HTML page of the upgrade process
transferStatistics()  : mixed
Transfer statistics data to new tables then drop old table
transferUrls()  : mixed
Transfer urls data from resource_text to resource_url table
updateCoreInternalVersion()  : mixed
Write the internal version in the database
updateDatabase()  : mixed
Update the database if required based on the current version
updateImageLinks()  : mixed
Update 'images' links in metadata to new images folder location
updatePluginTables()  : mixed
Copy papers table (word processor) to new format if it exists then drop it. Upgrade the soundExplorer table
upgradeTo10()  : mixed
Upgrade database schema to version 10 (6.0.8)
upgradeTo101()  : mixed
Upgrade database schema to version 101 (6.6.0)
upgradeTo101a()  : string|bool
Get any languages and print a form if they exist
upgradeTo101b()  : mixed
Deal with the languages form: 1. Transfer to resource_language::resourceLanguage column 2. Drop language and resource_language tables 3. Close the upgrade for this loop
upgradeTo102()  : mixed
Upgrade database schema to version 102 (6.6.0)
upgradeTo103()  : mixed
Upgrade database schema to version 103 (6.6.0)
upgradeTo104()  : mixed
Upgrade database schema to version 104 (6.6.0)
upgradeTo106()  : mixed
Upgrade database schema to version 106 (6.6.0)
upgradeTo108()  : mixed
Upgrade database schema to version 108 (6.6.0)
upgradeTo109()  : mixed
Upgrade database schema to version 109 (6.6.0)
upgradeTo11()  : mixed
Upgrade database schema to version 11 (6.2.1)
upgradeTo110()  : mixed
Upgrade database schema to version 110 (6.6.0)
upgradeTo111()  : mixed
Upgrade database schema to version 111 (6.6.4)
upgradeTo112()  : mixed
Upgrade database schema to version 112 (6.6.6)
upgradeTo113()  : mixed
Upgrade database schema to version 113 (6.6.8)
upgradeTo114()  : mixed
Upgrade database schema to version 114 (6.7.1)
upgradeTo117()  : mixed
Upgrade database schema to version 117 (6.7.1)
upgradeTo12()  : mixed
Upgrade database schema to version 12 (6.2.2 - part A)
upgradeTo120()  : mixed
Upgrade database schema to version 120 (6.7.1)
upgradeTo121()  : mixed
Upgrade database schema to version 121 (6.7.1)
upgradeTo122()  : mixed
Upgrade database schema to version 122 (6.7.1)
upgradeTo123()  : mixed
Upgrade database schema to version 123 (6.7.1)
upgradeTo124()  : mixed
Upgrade database schema to version 124 (6.7.1)
upgradeTo125()  : mixed
Upgrade database schema to version 125 (6.7.1)
upgradeTo126()  : mixed
Upgrade database schema to version 126 (6.7.1)
upgradeTo127()  : mixed
Upgrade database schema to version 127 (6.7.1)
upgradeTo127_disabled()  : mixed
Upgrade database schema to version 127 (6.7.1)
upgradeTo128()  : mixed
Upgrade database schema to version 128 (6.8.0)
upgradeTo129()  : mixed
Upgrade database schema to version 129 (6.8.0)
upgradeTo13()  : mixed
Upgrade database schema to version 13 (6.2.2 - part B)
upgradeTo130()  : mixed
Upgrade database schema to version 130 (6.8.0)
upgradeTo130MultiInsert()  : mixed
multiple insert routine for upgradeTo130()
upgradeTo131()  : mixed
Upgrade database schema to version 131 (6.8.0)
upgradeTo132()  : mixed
Upgrade database schema to version 132 (6.8.0)
upgradeTo133()  : mixed
Upgrade database schema to version 133 (6.8.0)
upgradeTo135()  : mixed
Upgrade database schema to version 135 (6.8.0)
upgradeTo136()  : mixed
Upgrade database schema to version 136 (6.8.0)
upgradeTo137()  : mixed
Auto-update the timestamp of temp_storage
upgradeTo14()  : mixed
Upgrade database schema to version 14 (6.2.2 - part C)
upgradeTo15()  : mixed
Upgrade database schema to version 15 (6.3.8)
upgradeTo17()  : mixed
Upgrade database schema to version 17 (6.3.8)
upgradeTo18()  : mixed
Upgrade database schema to version 18 (6.3.8)
upgradeTo19()  : mixed
Upgrade database schema to version 19 (6.3.8)
upgradeTo20()  : mixed
Upgrade database schema to version 20 (6.3.8)
upgradeTo21()  : mixed
Upgrade database schema to version 21 (6.3.8)
upgradeTo22()  : mixed
Upgrade database schema to version 22 (6.3.8)
upgradeTo23()  : mixed
Upgrade database schema to version 23 (6.4.0)
upgradeTo25()  : mixed
Upgrade database schema to version 25 (6.4.0)
upgradeTo26()  : mixed
Upgrade database schema to version 26 (6.4.0)
upgradeTo27()  : mixed
Upgrade database schema to version 27 (6.4.0)
upgradeTo28()  : mixed
Upgrade database schema to version 28 (6.4.0)
upgradeTo29()  : mixed
Remove unwanted rows in user_bibliography_resource (6.4.0)
upgradeTo30()  : mixed
Remove mistakenly named configBrowserTagID from config table (6.4.0)
upgradeTo31()  : mixed
Upgrade database schema to version 31 (6.4.0)
upgradeTo34()  : mixed
Upgrade database schema to version 34 (6.4.0)
upgradeTo35()  : mixed
Upgrade database schema to version 35 (6.4.0)
upgradeTo36()  : mixed
Upgrade database schema to version 36 (6.4.0)
upgradeTo37()  : mixed
Upgrade database schema to version 37 (6.4.0)
upgradeTo38()  : mixed
Upgrade database schema to version 38 (6.4.1)
upgradeTo39()  : mixed
Upgrade database schema to version 39 (6.4.1)
upgradeTo40()  : mixed
Upgrade database schema to version 40 (6.4.1)
upgradeTo41()  : mixed
Upgrade database schema to version 41 (6.4.1)
upgradeTo43()  : mixed
Upgrade database schema to version 43 (6.4.2)
upgradeTo44()  : mixed
Upgrade database schema to version 44 (6.4.2)
upgradeTo47()  : mixed
Upgrade database schema to version 47 (6.4.4)
upgradeTo48()  : mixed
Upgrade database schema to version 48 (6.4.4)
upgradeTo49()  : mixed
Upgrade database schema to version 49 (6.4.4)
upgradeTo50()  : mixed
Upgrade database schema to version 50 (6.4.4)
upgradeTo51()  : mixed
Upgrade database schema to version 51 (6.4.4)
upgradeTo52()  : mixed
Upgrade database to version 52 (6.4.4)
upgradeTo53()  : mixed
Upgrade database to version 53 (6.4.4)
upgradeTo54()  : mixed
Upgrade database to version 54 (6.4.5)
upgradeTo55()  : mixed
Upgrade database to version 55 (6.4.6)
upgradeTo56()  : mixed
Upgrade database to version 56 (6.4.6)
upgradeTo57()  : mixed
Upgrade database to version 57 (6.4.7)
upgradeTo58()  : mixed
Upgrade database schema to version 58 (6.4.7)
upgradeTo59()  : mixed
Upgrade database schema to version 59 (6.4.8)
upgradeTo5_2()  : mixed
Upgrade database schema to version 5.2
upgradeTo5_3()  : mixed
Upgrade database schema to version 5.3
upgradeTo5_4()  : mixed
Upgrade database schema to version 5.4.
upgradeTo5_5()  : mixed
Upgrade database schema to version 5.5.
upgradeTo5_6()  : mixed
Upgrade database schema to version 5.6.
upgradeTo5_7()  : mixed
Upgrade database schema to version 5.7.
upgradeTo5_8()  : mixed
Upgrade database schema to version 5.8. There are no changes to DB structure so no call to updateDbSchema('5.8').
upgradeTo5_9()  : mixed
Upgrade database schema to version 5.9
upgradeTo6()  : mixed
Upgrade database schema to version 6
upgradeTo60()  : mixed
Upgrade database schema to version 60 (6.4.8)
upgradeTo61()  : mixed
Upgrade database schema to version 61 (6.4.8)
upgradeTo62()  : mixed
Upgrade database schema to version 62 (6.4.8)
upgradeTo63()  : mixed
Upgrade database schema to version 63 (6.4.8)
upgradeTo64()  : mixed
Upgrade database schema to version 64 (6.4.8)
upgradeTo65()  : mixed
Upgrade database schema to version 65 (6.4.9)
upgradeTo66()  : mixed
Upgrade database schema to version 66 (6.4.9)
upgradeTo67()  : mixed
Upgrade database schema to version 67 (6.4.9)
upgradeTo68()  : mixed
Upgrade database schema to version 68 (6.4.9)
upgradeTo69()  : mixed
Upgrade database schema to version 69 (6.4.9)
upgradeTo7()  : mixed
Upgrade database schema to version 7 (6.0.4)
upgradeTo71()  : mixed
Upgrade database schema to version 71 (6.4.10)
upgradeTo74()  : mixed
Upgrade database schema to version 74 (6.6.0)
upgradeTo8()  : mixed
Upgrade database schema to version 8 (6.0.5)
upgradeTo89()  : mixed
Upgrade database schema to version 89 (6.6.0)
upgradeTo9()  : mixed
Upgrade database schema to version 9 (6.0.6)
upgradeTo90()  : mixed
Upgrade database schema to version 90 (6.6.0)
upgradeTo91()  : mixed
Upgrade database schema to version 91 (6.6.0)
upgradeTo92()  : mixed
Upgrade database schema to version 92 (6.6.0)
upgradeTo93()  : mixed
Upgrade database schema to version 93 (6.6.0)
upgradeTo95()  : mixed
Upgrade database schema to version 95 (6.6.0)
upgradeToTargetVersion()  : mixed
Performs the most common kind of upgrade

Properties

$interruptStepMessage

string

private mixed $interruptStepMessage = \FALSE

Methods

checkConfigFile()

Check permissions on config.php

private checkConfigFile() : mixed

6.4.0 (internal version 32) is the last version to modify the config file

CheckDatabaseEngineVersion()

Check if the MySql/MariaDB engine version is right

private CheckDatabaseEngineVersion() : bool
Return values
bool

copyBibContents()

Copy non-official bibliographic styles (if they exist)

private copyBibContents() : mixed

copyFolderContents()

Copy folder contents Code modified from: https://stackoverflow.com/questions/2082138/move-all-files-in-a-folder-to-another

private copyFolderContents(mixed $old, mixed $new) : mixed
Parameters
$old : mixed

source folder

$new : mixed

destination folder

copyWpContents()

Copy and update papers in the word processor plugin (if it/they exist)

private copyWpContents() : mixed

correctCreators()

Fix creator errors In some cases, 'resourcecreatorCreatorSurname' does not match the id in resourcecreatorCreatorMain

private correctCreators() : mixed

correctDatetimeFields()

Correct anomalies in the datetime fields Рthere should be no occurrence of '0000-00-00 00:00:00' as a value.

private correctDatetimeFields() : mixed

The strategy is:

  1. If default is NULL, set all incorrect values to that. Otherwise,
  2. Find the minimum value in the table then set all incorrect fields to that. Otherwise,
  3. If all values are incorrect, then set all values to default.

correctIndices()

Correct parameters of indices that are varchars by ensuring they have a limited prefix of (100)

private correctIndices() : mixed

There is no DROP INDEX IF EXISTS . . . syntax so another way must be found to check if the index exists before trying to drop it

createSuperAdmin()

Intercept for initial configuration by admin and, if necessary, display admin configuration interface (new installation means users table is empty).

private createSuperAdmin() : mixed

displayUpdatePreambule()

Check and print status of update scripts

private displayUpdatePreambule() : mixed

endDisplay()

End to emit the HTML page of the upgrade process

private endDisplay() : mixed

The upgrade process needs a separate display function so that it does not depend on the template system while the configuration is incomplete.

flushTempStorage()

Flush the temp_storage table (NB old form and new form)

private flushTempStorage() : mixed

intervalVersion2publicVersion()

Get the minimum public version corresponding to an internal version

private intervalVersion2publicVersion(float $version) : string
Parameters
$version : float

Internal version number

Return values
string

Public version number

pauseUpdateDisplay()

End an upgrade step by displaying a message and a form

private pauseUpdateDisplay() : mixed

Can be a pause during a too long operation or the end of a step

  • For an interrupt, fill in the $interruptStepMessage member before calling the function.
  • For a normal end of step, fill in the endStepMessage member before calling the function.

removeOldTablePrefix()

Return a table name without the old prefix wkx_

private removeOldTablePrefix(string $table) : string
Parameters
$table : string

A prefixed table name

Return values
string

renameTable()

Rename a table

private renameTable(string $tablesrc, string $tabledst) : mixed
Parameters
$tablesrc : string

Fullname of a source table

$tabledst : string

Fullname of a destination table

requestSuperAdminLogin()

Only the superadmin may update the database -- ask for login

private requestSuperAdminLogin(string $currentdbVersion) : mixed
Parameters
$currentdbVersion : string

rewriteConfigFile()

Write new config.php with upgrade to >= WIKINDX v6.4.2

private rewriteConfigFile() : mixed

startDisplayCode()

Return the common code for the HTML display of the install/updage process

private startDisplayCode(string $heading) : string
Parameters
$heading : string
Return values
string

startInstallDisplay()

Start to emit the HTML page of the install process

private startInstallDisplay() : mixed

The install process needs a separate display function so that it does not depend on the template system while the configuration is incomplete.

startUpdateDisplay()

Start to emit the HTML page of the upgrade process

private startUpdateDisplay() : mixed

The upgrade process needs a separate display function so that it does not depend on the template system while the configuration is incomplete.

transferStatistics()

Transfer statistics data to new tables then drop old table

private transferStatistics() : mixed

A fault in the previous statistics compilation means that each month's statistics needs to be backdated one month ...

transferUrls()

Transfer urls data from resource_text to resource_url table

private transferUrls() : mixed

updateCoreInternalVersion()

Write the internal version in the database

private updateCoreInternalVersion([string $version = NULL ]) : mixed

This function should be called as the last instruction of an upgradeToXXX() function.

If a crash occurs, updateCoreInternalVersion() is not called and the upgrade can resume safly at the start of the failed step after a fix.

If $version is NULL, the version number used it $this->targetVersion.

Parameters
$version : string = NULL

(Default is NULL)

updateDatabase()

Update the database if required based on the current version

private updateDatabase(float $dbVersion) : mixed
Parameters
$dbVersion : float

Update 'images' links in metadata to new images folder location

private updateImageLinks() : mixed

updatePluginTables()

Copy papers table (word processor) to new format if it exists then drop it. Upgrade the soundExplorer table

private updatePluginTables() : mixed

upgradeTo10()

Upgrade database schema to version 10 (6.0.8)

private upgradeTo10() : mixed

Add FULLTEXT indices

upgradeTo101()

Upgrade database schema to version 101 (6.6.0)

private upgradeTo101() : mixed

Conform resource language to locales:

  1. Add resourceLanguage column to resource table
  2. If language table exists: a. each languageLanguage is matched to a top-level locale (e.g., 'fr', 'en') and potential matches displayed in a form that must be submitted before the update is complete. b. write the selected locales to resourceLanguage in resource table for relevant resources
  3. Drop both language and resource_language tables.

upgradeTo101a()

Get any languages and print a form if they exist

private upgradeTo101a() : string|bool
Return values
string|bool

upgradeTo101b()

Deal with the languages form: 1. Transfer to resource_language::resourceLanguage column 2. Drop language and resource_language tables 3. Close the upgrade for this loop

private upgradeTo101b() : mixed

upgradeTo102()

Upgrade database schema to version 102 (6.6.0)

private upgradeTo102() : mixed

Replace configMailSmtpAuth by configMailSmtpAuthType option

upgradeTo103()

Upgrade database schema to version 103 (6.6.0)

private upgradeTo103() : mixed

Remove the cache/languages/locales_system.json file. The translation système don't use it anymore

upgradeTo104()

Upgrade database schema to version 104 (6.6.0)

private upgradeTo104() : mixed

Transcode system locale codes to Intl locale codes

LkpPo(Fix), 2023-02-08: the upgrade of XML styles was broken and the code have been removed

upgradeTo106()

Upgrade database schema to version 106 (6.6.0)

private upgradeTo106() : mixed

Add a column to users_basket to store ideas in a basket

upgradeTo108()

Upgrade database schema to version 108 (6.6.0)

private upgradeTo108() : mixed
  1. Add the wordprocessor table
  2. If plugin_wordprocessor exists: a) transfer its contents to the new table if the hashfile exists in data/plugins/wordprocessor/ b) set up default paper preferences
  3. Remove Word Processor plugin folders and its contents

LkpPo(Fix), 2023-06-08: XML styles upgrade was broken and the corresponding code was removed from this step

upgradeTo109()

Upgrade database schema to version 109 (6.6.0)

private upgradeTo109() : mixed

Remove WIKINDX_MAX_WRITECHUNK option. Add type parameters to:

  • WIKINDX_DB_HOST
  • WIKINDX_DB
  • WIKINDX_DB_USER
  • WIKINDX_DB_PASSWORD
  • WIKINDX_PATH_AUTO_DETECTION
  • WIKINDX_URL_BASE

Rewrite the config file

upgradeTo11()

Upgrade database schema to version 11 (6.2.1)

private upgradeTo11() : mixed

Convert tag sizes to scale factors

upgradeTo110()

Upgrade database schema to version 110 (6.6.0)

private upgradeTo110() : mixed

Remove 'data/files' folder (WIKINDX_DIR_DATA_FILES).

Rewrite the config file

upgradeTo111()

Upgrade database schema to version 111 (6.6.4)

private upgradeTo111() : mixed

Purge the style cache (cache files were not always refreshed if the original style files had a future date)

upgradeTo112()

Upgrade database schema to version 112 (6.6.6)

private upgradeTo112() : mixed

Clear the version table after the wordprocessor migration to the core

Missing instruction of step 108.

upgradeTo113()

Upgrade database schema to version 113 (6.6.8)

private upgradeTo113() : mixed

Not an upgrade of the database but just a flush of the temp storage table and some sessions to ensure the debugged list/search code works fine.

upgradeTo114()

Upgrade database schema to version 114 (6.7.1)

private upgradeTo114() : mixed

Purge the Smarty compilation cache (for Smarty 5 migration)

upgradeTo117()

Upgrade database schema to version 117 (6.7.1)

private upgradeTo117() : mixed

Redefine the cache table with a primary key and transpose columns to lines [#528]

upgradeTo12()

Upgrade database schema to version 12 (6.2.2 - part A)

private upgradeTo12() : mixed

Convert tag sizes to scale factors

upgradeTo120()

Upgrade database schema to version 120 (6.7.1)

private upgradeTo120() : mixed

The indexes could not all be deleted or created due to syntax errors in the SQL queries of the previous steps.

We delete all non PRIMARY indexes to recreate them in the 4 next steps. The two operations are separated because creating indexes can take quite a long time on large tables.

The indexes to be recreated are divided into roughly equal batches.

upgradeTo121()

Upgrade database schema to version 121 (6.7.1)

private upgradeTo121() : mixed

Rebuild indexes deleted during step 120 (batch 1)

upgradeTo122()

Upgrade database schema to version 122 (6.7.1)

private upgradeTo122() : mixed

Rebuild indexes deleted during step 120 (batch 2)

upgradeTo123()

Upgrade database schema to version 123 (6.7.1)

private upgradeTo123() : mixed

Rebuild indexes deleted during step 120 (batch 3)

upgradeTo124()

Upgrade database schema to version 124 (6.7.1)

private upgradeTo124() : mixed

Rebuild indexes deleted during step 120 (batch 4)

upgradeTo125()

Upgrade database schema to version 125 (6.7.1)

private upgradeTo125() : mixed

Fixes custom XML styles and upgrade them to JSON from osbibVersion v3.1 to v28 (become v29)

upgradeTo126()

Upgrade database schema to version 126 (6.7.1)

private upgradeTo126() : mixed

Fix a syntaxic error of SQL code for MySQL ("COLUMN IF EXISTS" is unknown) [#569]

Replay SQL queries with syntactical errors from previous steps found during development of version 6.7.1:

  • Drop columns relating to the forgotten password system using questions and answers (steps 118, 119)
  • Drop configPHP (step 96)
  • Drop configFloat (step 11)
  • Drop usersChangePasswordTimestamp column (step 13)
  • Drop usersCmsTag column (step 97)
  • Drop UserSession column (step 33)
  • Rename users.usersCookie db field to users.usersAuthRememberMe step 92)

upgradeTo127()

Upgrade database schema to version 127 (6.7.1)

private upgradeTo127() : mixed

This step is removed because the issue is not resolved satisfactorily

upgradeTo127_disabled()

Upgrade database schema to version 127 (6.7.1)

private upgradeTo127_disabled() : mixed

Compute all BibTeX keys with a clean ASCII transliteration

upgradeTo128()

Upgrade database schema to version 128 (6.8.0)

private upgradeTo128() : mixed

Fix the ASCII transliteration of BibTeX keys

upgradeTo129()

Upgrade database schema to version 129 (6.8.0)

private upgradeTo129() : mixed

Parse again MS Word binary attachments with PHPWord library (added with 6.8.0)

upgradeTo13()

Upgrade database schema to version 13 (6.2.2 - part B)

private upgradeTo13() : mixed

upgradeTo130()

Upgrade database schema to version 130 (6.8.0)

private upgradeTo130() : mixed

Create the new tables search_xxx which hold HTML-free duplicates of fields originating tinyMCE's textareas and which are used in quicksearch and advanced search.

Duplicate and clean the fields.

Note that ideas were originally transferred here but are now dealt with in step 131

Speed things up using multiInserts but be careful where fields are mediumtext types

upgradeTo130MultiInsert()

multiple insert routine for upgradeTo130()

private upgradeTo130MultiInsert(string $table, array<string|int, mixed> $fields, array<string|int, mixed> $values) : mixed
Parameters
$table : string
$fields : array<string|int, mixed>
$values : array<string|int, mixed>

upgradeTo131()

Upgrade database schema to version 131 (6.8.0)

private upgradeTo131() : mixed

Transfer ideas from resource_metadata to ideas and to search_ideas

Transfer idea keywords from resource_keyword to ideas_keyword

upgradeTo132()

Upgrade database schema to version 132 (6.8.0)

private upgradeTo132() : mixed

Add style_titleInvertFormat to each bibliographic JSON file

NB: this code have been migrated inside class PARSESTYLEJSON.

upgradeTo133()

Upgrade database schema to version 133 (6.8.0)

private upgradeTo133() : mixed

Remove column usersDisplayBibtexLink from users table

upgradeTo135()

Upgrade database schema to version 135 (6.8.0)

private upgradeTo135() : mixed

Merge resourcecustomShort and resourcecustomLong into resourcecustomText and convert 'S' custom fields to 'L' custom fields

upgradeTo136()

Upgrade database schema to version 136 (6.8.0)

private upgradeTo136() : mixed

Rebuild the search_custom table data since the content of resourcecustomShort and resourcecustomLong have been merged

upgradeTo137()

Auto-update the timestamp of temp_storage

private upgradeTo137() : mixed

upgradeTo14()

Upgrade database schema to version 14 (6.2.2 - part C)

private upgradeTo14() : mixed

Convert tag sizes to scale factors

upgradeTo15()

Upgrade database schema to version 15 (6.3.8)

private upgradeTo15() : mixed

Convert tag sizes to scale factors

upgradeTo17()

Upgrade database schema to version 17 (6.3.8)

private upgradeTo17() : mixed

Convert tag sizes to scale factors

upgradeTo18()

Upgrade database schema to version 18 (6.3.8)

private upgradeTo18() : mixed

upgradeTo19()

Upgrade database schema to version 19 (6.3.8)

private upgradeTo19() : mixed

Following change to storage of session arrays, reset the session state variable to NULL

upgradeTo20()

Upgrade database schema to version 20 (6.3.8)

private upgradeTo20() : mixed

Create new keyword groups table

upgradeTo21()

Upgrade database schema to version 21 (6.3.8)

private upgradeTo21() : mixed

Correct default value in user_kg_usergroups

upgradeTo22()

Upgrade database schema to version 22 (6.3.8)

private upgradeTo22() : mixed

Correct default value for usersFullname to '';

upgradeTo23()

Upgrade database schema to version 23 (6.4.0)

private upgradeTo23() : mixed

Correct default value for usersFullname to '';

upgradeTo25()

Upgrade database schema to version 25 (6.4.0)

private upgradeTo25() : mixed

upgradeTo26()

Upgrade database schema to version 26 (6.4.0)

private upgradeTo26() : mixed

Drop form_data and create temp_storage table

upgradeTo27()

Upgrade database schema to version 27 (6.4.0)

private upgradeTo27() : mixed

Drop form_data and create temp_storage table

upgradeTo28()

Upgrade database schema to version 28 (6.4.0)

private upgradeTo28() : mixed

Drop form_data and create temp_storage table

upgradeTo29()

Remove unwanted rows in user_bibliography_resource (6.4.0)

private upgradeTo29() : mixed

upgradeTo30()

Remove mistakenly named configBrowserTagID from config table (6.4.0)

private upgradeTo30() : mixed

Rename option configBrowserTagID to configBrowserTabID

upgradeTo31()

Upgrade database schema to version 31 (6.4.0)

private upgradeTo31() : mixed

Rename option LdapGroupCn to LdapGroupDn

upgradeTo34()

Upgrade database schema to version 34 (6.4.0)

private upgradeTo34() : mixed

Add new table to keep the current internal version number of components and core

upgradeTo35()

Upgrade database schema to version 35 (6.4.0)

private upgradeTo35() : mixed

Remove database_summary table

upgradeTo36()

Upgrade database schema to version 36 (6.4.0)

private upgradeTo36() : mixed

Add a default value to users.usersPassword

upgradeTo37()

Upgrade database schema to version 37 (6.4.0)

private upgradeTo37() : mixed

Clear the cache of attachments because their creation has been greatly improved and search results will be better

upgradeTo38()

Upgrade database schema to version 38 (6.4.1)

private upgradeTo38() : mixed

Fix the wrong definition of user_kg_usergroups.userkgusergroupsUserGroupId (NULL is allowed)

upgradeTo39()

Upgrade database schema to version 39 (6.4.1)

private upgradeTo39() : mixed

Flush temp_storage table and fix locale in style XML files

LkpPo(Fix), 2023-02-08: the upgrade of XML styles was broken and the code have been removed

upgradeTo40()

Upgrade database schema to version 40 (6.4.1)

private upgradeTo40() : mixed

Set utf8mb4_unicode_520_ci as the default collation of the database

upgradeTo41()

Upgrade database schema to version 41 (6.4.1)

private upgradeTo41() : mixed

Add a default value to the users.usersFullname field (bugfix #316)

upgradeTo43()

Upgrade database schema to version 43 (6.4.2)

private upgradeTo43() : mixed

Resize collectionType field. Resize publisherType field. Resize resourceattachmentsFileSize field. Resize resourceattachmentsHashFilename field. Resize resourcemetadataType field. Resize resourceType field.

Add a missing index on resourceattachmentsResourceId (previous upgrade code missing). Add a missing index on resourcecustomCustomId (previous upgrade code missing). Add a missing index on resourcelanguageLanguageId (previous upgrade code missing). Add a missing index on resourcelanguageResourceId (previous upgrade code missing). Add a missing index on resourcemiscCollection (previous upgrade code missing). Add a missing index on resourcemiscPublisher (previous upgrade code missing). Add a missing index on resourcetimestampTimestamp (previous upgrade code missing). Add a missing index on resourcetimestampTimestamp (previous upgrade code missing). Add a missing index on resourcetimestampTimestampAdd (previous upgrade code missing).

Add a missing index on collection. Add a missing index on publisherType. Add a missing index on resourceattachmentsEmbargo. Add a missing index on resourceattachmentsEmbargoUntil. Add a missing index on resourceattachmentsHashFilename. Add a missing index on resourceattachmentsPrimary. Add a missing index on resourceattachmentsTimestamp. Add a missing index on resourcecategorySubcategoryId. Add a missing index on resourcecreatorRole. Add a missing index on resourcekeywordMetadataId. Add a missing index on resourcemetadataPrivate. Add a missing index on resourcemetadataType. Add a missing index on resourcemiscAddUserIdResource. Add a missing index on resourcemiscEditUserIdResource. Add a missing index on resourcemiscPeerReviewed. Add a missing index on resourcemiscQuarantine. Add a missing index on resourcetextAddUserIdAbstract. Add a missing index on resourcetextAddUserIdNote. Add a missing index on resourcetextEditUserIdAbstract. Add a missing index on resourcetextEditUserIdNote. Add a missing index on resourceusertagsTagId. Add a missing index on resourceyearYear2. Add a missing index on resourceyearYear3. Add a missing index on resourceyearYear4. Add a missing index on subcategoryCategoryId. Add a missing index on tempstorageTimestamp. Add a missing index on userbibliographyresourceBibliographyId. Add a missing index on userbibliographyUserGroupId. Add a missing index on userbibliographyUserId. Add a missing index on usergroupsAdminId. Add a missing index on usergroupsusersGroupId. Add a missing index on usergroupsusersUserId. Add a missing index on userkeywordgroupsUserId. Add a missing index on userkgkeywordsKeywordGroupId. Add a missing index on userregisterConfirmed. Add a missing index on userregisterTimestamp. Add a missing index on usersBlock. Add a missing index on usertagsUserId.

Drop old form_data table

Redefine categoryCategory index. Redefine keywordKeyword index. Redefine resourceType index. Redefine resourceTitle index.

upgradeTo44()

Upgrade database schema to version 44 (6.4.2)

private upgradeTo44() : mixed

Ensure utf8mb4_unicode_520_ci is always the default collation of the database.

upgradeTo47()

Upgrade database schema to version 47 (6.4.4)

private upgradeTo47() : mixed

Create table resource_url.

upgradeTo48()

Upgrade database schema to version 48 (6.4.4)

private upgradeTo48() : mixed

Drop url-related columns from resource_text.

upgradeTo49()

Upgrade database schema to version 49 (6.4.4)

private upgradeTo49() : mixed

Add column resourcemiscMetadata to resource_misc.

upgradeTo50()

Upgrade database schema to version 50 (6.4.4)

private upgradeTo50() : mixed

Drop resource_summary table Flush cache table as no longer using base64 encoding/decoding

upgradeTo51()

Upgrade database schema to version 51 (6.4.4)

private upgradeTo51() : mixed

Add column usersLastInternalVersion to users Remove super admin's bookmark and other session variables storing SQL statements to account for changes at upgradeTo49()

upgradeTo52()

Upgrade database to version 52 (6.4.4)

private upgradeTo52() : mixed

Remove base64 encoding from collectionDefault field in collection table

upgradeTo53()

Upgrade database to version 53 (6.4.4)

private upgradeTo53() : mixed

Remove base64 encoding from global options

upgradeTo54()

Upgrade database to version 54 (6.4.5)

private upgradeTo54() : mixed

Store session in session table

upgradeTo55()

Upgrade database to version 55 (6.4.6)

private upgradeTo55() : mixed

Rename configImagesMaxSize option to configImgUploadMaxSize Rename configImagesAllow option to configImgAllow Rename configFileAttach option to configFileAttachAllow

upgradeTo56()

Upgrade database to version 56 (6.4.6)

private upgradeTo56() : mixed

Check there are no non wikindx table in the db and block the upgrade if we find one.

upgradeTo57()

Upgrade database to version 57 (6.4.7)

private upgradeTo57() : mixed

Check there are no non wikindx table in the db and block the upgrade if we find one.

upgradeTo58()

Upgrade database schema to version 58 (6.4.7)

private upgradeTo58() : mixed

Clear missing attachments (code moved outside of the upgrade)

upgradeTo59()

Upgrade database schema to version 59 (6.4.8)

private upgradeTo59() : mixed

Add usersDisplayResourceStatistics column to users table

upgradeTo5_2()

Upgrade database schema to version 5.2

private upgradeTo5_2() : mixed

Use MySQL utf8 encode and collation utf8_unicode_520_ci Lowercase all table names Use InnoDB for all tables

upgradeTo5_3()

Upgrade database schema to version 5.3

private upgradeTo5_3() : mixed

5.3 is a missing internal version, just bump the number

upgradeTo5_4()

Upgrade database schema to version 5.4.

private upgradeTo5_4() : mixed

Reconfiguration of config table and shifting many variables to it from config.php

upgradeTo5_5()

Upgrade database schema to version 5.5.

private upgradeTo5_5() : mixed

Addition of new fields to users table for auth security and GDPR

upgradeTo5_6()

Upgrade database schema to version 5.6.

private upgradeTo5_6() : mixed

Convert the database to utf8 charset and utf8_unicode_ci collation

upgradeTo5_7()

Upgrade database schema to version 5.7.

private upgradeTo5_7() : mixed

Convert the database to utf8mb4 charset and utf8mb4_unicode_520_ci collation Fix resource_metadata.resourcemetadataPrivate size to 1 character

upgradeTo5_8()

Upgrade database schema to version 5.8. There are no changes to DB structure so no call to updateDbSchema('5.8').

private upgradeTo5_8() : mixed

Check resource totals are correct Check creator correlations are correct

upgradeTo5_9()

Upgrade database schema to version 5.9

private upgradeTo5_9() : mixed

Move directories attachments, attachments_cache, images, and files Change configuration Update images links

upgradeTo6()

Upgrade database schema to version 6

private upgradeTo6() : mixed

Move word processor papers and styles custom styles components

upgradeTo60()

Upgrade database schema to version 60 (6.4.8)

private upgradeTo60() : mixed

Add resourceattachmentsText column to resource_attachments table

upgradeTo61()

Upgrade database schema to version 61 (6.4.8)

private upgradeTo61() : mixed

Copy the content of attachment cache files in the resourceattachmentsText column to resource_attachments table keep a copy on the cache attachment folder

upgradeTo62()

Upgrade database schema to version 62 (6.4.8)

private upgradeTo62() : mixed

Remove the content of attachment cache files

upgradeTo63()

Upgrade database schema to version 63 (6.4.8)

private upgradeTo63() : mixed

Recreate the session table and keep only valide sessions for the max life time of the custom GC

upgradeTo64()

Upgrade database schema to version 64 (6.4.8)

private upgradeTo64() : mixed

Add

upgradeTo65()

Upgrade database schema to version 65 (6.4.9)

private upgradeTo65() : mixed

Remove configRssBibstyle option Replace configSiteMapAllow by configSiteMapDisallow option Replace configRssAllow by configRssDisallow option Replace configGsAllow by configGsDisallow option

upgradeTo66()

Upgrade database schema to version 66 (6.4.9)

private upgradeTo66() : mixed

Rename option configRssDisplay to configRssDisplayEditedResources

upgradeTo67()

Upgrade database schema to version 67 (6.4.9)

private upgradeTo67() : mixed

Fix the mimetype of attachments in db and rebuild the cache of attachments with a wrong mimetype

upgradeTo68()

Upgrade database schema to version 68 (6.4.9)

private upgradeTo68() : mixed

Replace configBibutilsPath by configBinFolderBibutils option

upgradeTo69()

Upgrade database schema to version 69 (6.4.9)

private upgradeTo69() : mixed

Force rebuild of attachment cache

upgradeTo7()

Upgrade database schema to version 7 (6.0.4)

private upgradeTo7() : mixed

upgradeTo71()

Upgrade database schema to version 71 (6.4.10)

private upgradeTo71() : mixed

Switch the old chicago style to chicago-ft (rename, no feature change)

upgradeTo74()

Upgrade database schema to version 74 (6.6.0)

private upgradeTo74() : mixed

Remove config options used by the removed CMS print feature

upgradeTo8()

Upgrade database schema to version 8 (6.0.5)

private upgradeTo8() : mixed

upgradeTo89()

Upgrade database schema to version 89 (6.6.0)

private upgradeTo89() : mixed

Fix the case of the usersListLink field

upgradeTo9()

Upgrade database schema to version 9 (6.0.6)

private upgradeTo9() : mixed

upgradeTo90()

Upgrade database schema to version 90 (6.6.0)

private upgradeTo90() : mixed

Not a database upgrade but a clean out of bookmarks, lastMulti, and lastSolo to account for the new citation engine which has diffferent SQL statements. Clear out also the temporary storage.

upgradeTo91()

Upgrade database schema to version 91 (6.6.0)

private upgradeTo91() : mixed

Change db field to LONGBLOB type because they store serialized PHP:

  • cacheConferenceOrganisers
  • cacheKeywords
  • cacheMetadataCollections
  • cacheMetadataCreators
  • cacheMetadataKeywords
  • cacheMetadataPublishers
  • cacheMusingKeywords
  • cacheParaphraseKeywords
  • cacheQuoteKeywords
  • cacheResourceCollections
  • cacheResourceCollectionShorts
  • cacheResourceCollectionTitles
  • cacheResourceCreators
  • cacheResourceKeywords
  • cacheResourcePublishers
Tags
see
https://www.php.net/manual/en/function.serialize.php#refsect1-function.serialize-returnvalues

upgradeToTargetVersion()

Performs the most common kind of upgrade

private upgradeToTargetVersion() : mixed

Upgrade to the targetVersion with the most common operations:

  • Simple DB upgrade
  • Bump version
  • Display upgrade report

This function should not be called directly. You must define an upgradeToN function to manage the upgrade of version N. This function is just a helper. This is preferable to avoid performing operations by mistake which corrupt the database.


        
On this page

Search results