Rev 296 | Rev 386 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 296 | Rev 360 | ||
---|---|---|---|
Line 20... | Line 20... | ||
20 | // DATABASE UPDATE 201 -> 202 |
20 | // DATABASE UPDATE 201 -> 202 |
21 | // This script will be included by OIDplusDatabaseConnection.class.php inside function afterConnect(). |
21 | // This script will be included by OIDplusDatabaseConnection.class.php inside function afterConnect(). |
22 | // Parameters: $this is the OIDplusDatabaseConnection class |
22 | // Parameters: $this is the OIDplusDatabaseConnection class |
23 | // $version is the current version (this script MUST increase the number by 1 when it is done) |
23 | // $version is the current version (this script MUST increase the number by 1 when it is done) |
24 | 24 | ||
- | 25 | if (!isset($version)) throw new OIDplusException(_L('Argument "%1" is missing; was the file included in a wrong way?','version')); |
|
25 | if ($this->transaction_supported()) $this->transaction_begin(); |
26 | if (!isset($this)) throw new OIDplusException(_L('Argument "%1" is missing; was the file included in a wrong way?','this')); |
26 | 27 | ||
27 | if (!isset($version)) throw new OIDplusException("Argument 'version' is missing; was the file included in a wrong way?"); |
- | |
28 | if (!isset($this)) throw new OIDplusException("Argument 'this' is missing; was the file included in a wrong way?"); |
28 | if ($this->transaction_supported()) $this->transaction_begin(); |
29 | 29 | ||
30 | // Change bit(1) types to boolean/tinyint(1) |
30 | // Change bit(1) types to boolean/tinyint(1) |
31 | if ($this->getSlang()::id() == 'pgsql') { |
31 | if ($this->getSlang()::id() == 'pgsql') { |
32 | $this->query("alter table ###config alter protected drop default"); |
32 | $this->query("alter table ###config alter protected drop default"); |
33 | $this->query("alter table ###config alter protected type boolean using get_bit(protected ,0)::boolean"); |
33 | $this->query("alter table ###config alter protected type boolean using get_bit(protected ,0)::boolean"); |