Rev 1050 | Rev 1219 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1050 | 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_201(OIDplusDatabaseConnection $db) { |
28 | function oidplus_dbupdate_201(OIDplusDatabaseConnection $db): int { |
29 | if ($db->transaction_supported()) $db->transaction_begin(); |
29 | if ($db->transaction_supported()) $db->transaction_begin(); |
30 | 30 | ||
31 | // Change bit(1) types to boolean/tinyint(1) |
31 | // Change bit(1) types to boolean/tinyint(1) |
32 | if ($db->getSlang()->id() == 'pgsql') { |
32 | if ($db->getSlang()->id() == 'pgsql') { |
33 | $db->query("alter table ###config alter protected drop default"); |
33 | $db->query("alter table ###config alter protected drop default"); |