Rev 1050 | Rev 1130 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1050 | Rev 1100 | ||
---|---|---|---|
Line 24... | Line 24... | ||
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) { |
- | 29 | if ($db->transaction_supported()) $db->transaction_begin(); |
|
29 | 30 | ||
30 | // Change collation so that objects like FourCC can be case-sensitive |
31 | // Change collation so that objects like FourCC can be case-sensitive |
31 | if ($db->getSlang()->id() == 'mysql') { |
32 | if ($db->getSlang()->id() == 'mysql') { |
32 | $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;"); |
33 | $db->query("ALTER TABLE ###iri CHANGE `oid` `oid` varchar(255) NOT NULL COLLATE utf8_bin;"); |
34 | $db->query("ALTER TABLE ###iri CHANGE `oid` `oid` varchar(255) NOT NULL COLLATE utf8_bin;"); |
Line 60... | Line 61... | ||
60 | } |
61 | } |
61 | 62 | ||
62 | $version = 1001; |
63 | $version = 1001; |
63 | $db->query("UPDATE ###config SET value = ? WHERE name = 'database_version'", array($version)); |
64 | $db->query("UPDATE ###config SET value = ? WHERE name = 'database_version'", array($version)); |
64 | 65 | ||
- | 66 | if ($db->transaction_supported()) $db->transaction_commit(); |
|
- | 67 | ||
65 | return $version; |
68 | return $version; |
66 | } |
69 | } |