Subversion Repositories oidplus

Rev

Rev 1100 | Rev 1219 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1100 Rev 1130
Line 23... Line 23...
23
 * This function will be called by OIDplusDatabaseConnection.class.php at method afterConnect().
23
 * This function will be called by OIDplusDatabaseConnection.class.php at method afterConnect().
24
 * @param OIDplusDatabaseConnection $db is the OIDplusDatabaseConnection class
24
 * @param OIDplusDatabaseConnection $db is the OIDplusDatabaseConnection class
25
 * @return int new version set
25
 * @return int new version set
26
 * @throws \ViaThinkSoft\OIDplus\OIDplusException
26
 * @throws \ViaThinkSoft\OIDplus\OIDplusException
27
 */
27
 */
28
function oidplus_dbupdate_1001(OIDplusDatabaseConnection $db) {
28
function oidplus_dbupdate_1001(OIDplusDatabaseConnection $db): int {
29
        if ($db->transaction_supported()) $db->transaction_begin();
29
        if ($db->transaction_supported()) $db->transaction_begin();
30
 
30
 
31
        // Change collation so that objects like FourCC can be case-sensitive
31
        // Change collation so that objects like FourCC can be case-sensitive
32
        if ($db->getSlang()->id() == 'mysql') {
32
        if ($db->getSlang()->id() == 'mysql') {
33
                $db->query("ALTER TABLE ###asn1id     CHANGE `oid`    `oid`    varchar(255) NOT NULL     COLLATE utf8_bin;");
33
                $db->query("ALTER TABLE ###asn1id     CHANGE `oid`    `oid`    varchar(255) NOT NULL     COLLATE utf8_bin;");