Rev 558 | Rev 1050 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 558 | Rev 830 | ||
---|---|---|---|
Line 18... | Line 18... | ||
18 | */ |
18 | */ |
19 | 19 | ||
20 | /** |
20 | /** |
21 | * This function will be called by OIDplusDatabaseConnection.class.php at method afterConnect(). |
21 | * This function will be called by OIDplusDatabaseConnection.class.php at method afterConnect(). |
22 | * @param OIDplusDatabaseConnection $db is the OIDplusDatabaseConnection class |
22 | * @param OIDplusDatabaseConnection $db is the OIDplusDatabaseConnection class |
23 | * @param string $version is the current version (this script MUST increase the number by 1 when it is done) |
23 | * @return int new version set |
24 | * @throws OIDplusException |
24 | * @throws OIDplusException |
25 | */ |
25 | */ |
26 | function oidplus_dbupdate_203_204(OIDplusDatabaseConnection $db, string &$version) { |
26 | function oidplus_dbupdate_203(OIDplusDatabaseConnection $db) { |
27 | if ($db->transaction_supported()) $db->transaction_begin(); |
27 | if ($db->transaction_supported()) $db->transaction_begin(); |
28 | 28 | ||
29 | if ($db->getSlang()->id() == 'mssql') { |
29 | if ($db->getSlang()->id() == 'mssql') { |
30 | $db->query("ALTER TABLE ###log_object ADD severity [int]"); |
30 | $db->query("ALTER TABLE ###log_object ADD severity [int]"); |
31 | $db->query("ALTER TABLE ###log_user ADD severity [int]"); |
31 | $db->query("ALTER TABLE ###log_user ADD severity [int]"); |
Line 45... | Line 45... | ||
45 | 45 | ||
46 | $version = 204; |
46 | $version = 204; |
47 | $db->query("UPDATE ###config SET value = ? WHERE name = 'database_version'", array($version)); |
47 | $db->query("UPDATE ###config SET value = ? WHERE name = 'database_version'", array($version)); |
48 | 48 | ||
49 | if ($db->transaction_supported()) $db->transaction_commit(); |
49 | if ($db->transaction_supported()) $db->transaction_commit(); |
- | 50 | ||
- | 51 | return $version; |
|
50 | } |
52 | } |
51 | 53 |