Rev 1219 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1219 | Rev 1231 | ||
---|---|---|---|
Line 25... | Line 25... | ||
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_202(OIDplusDatabaseConnection $db): int { |
28 | function oidplus_dbupdate_202(OIDplusDatabaseConnection $db): int { |
29 | if ($db->transaction_supported()) $db->transaction_begin(); |
29 | if ($db->transaction_supported()) $db->transaction_begin(); |
30 | 30 | try { |
|
31 | if ($db->getSlang()->id() == 'mssql') { |
31 | if ($db->getSlang()->id() == 'mssql') { |
32 | // (Function "getOidArc" has been removed 6 April 2023) |
32 | // (Function "getOidArc" has been removed 6 April 2023) |
33 | } |
33 | } |
34 | 34 | ||
35 | $version = 203; |
35 | $version = 203; |
36 | $db->query("UPDATE ###config SET value = ? WHERE name = 'database_version'", array("$version")); |
36 | $db->query("UPDATE ###config SET value = ? WHERE name = 'database_version'", array("$version")); |
37 | 37 | ||
38 | if ($db->transaction_supported()) $db->transaction_commit(); |
38 | if ($db->transaction_supported()) $db->transaction_commit(); |
- | 39 | } catch (\Exception $e) { |
|
- | 40 | if ($db->transaction_supported()) $db->transaction_rollback(); |
|
- | 41 | throw new $e; |
|
- | 42 | } |
|
39 | 43 | ||
40 | return $version; |
44 | return $version; |
41 | } |
45 | } |