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_204_205(OIDplusDatabaseConnection $db, string &$version) { |
26 | function oidplus_dbupdate_204(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 ###ra alter column [ra_name] [varchar](100) NULL;"); |
30 | $db->query("alter table ###ra alter column [ra_name] [varchar](100) NULL;"); |
31 | $db->query("alter table ###ra alter column [personal_name] [varchar](100) NULL;"); |
31 | $db->query("alter table ###ra alter column [personal_name] [varchar](100) NULL;"); |
Line 121... | Line 121... | ||
121 | 121 | ||
122 | $version = 205; |
122 | $version = 205; |
123 | $db->query("UPDATE ###config SET value = ? WHERE name = 'database_version'", array($version)); |
123 | $db->query("UPDATE ###config SET value = ? WHERE name = 'database_version'", array($version)); |
124 | 124 | ||
125 | if ($db->transaction_supported()) $db->transaction_commit(); |
125 | if ($db->transaction_supported()) $db->transaction_commit(); |
- | 126 | ||
- | 127 | return $version; |
|
126 | } |
128 | } |