We disabled them because they are not supported on Oracle DB and it is
still the case for OCI < 23. But instead of disabling the support
completely for every database types, mark non-nullable boolean column as
actually nullable when using Oracle.
This allow to use some slighly lighter schema on normal databases who
support natively booleans wheen we don't need to store 3 states
true|false|null.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
throw new \InvalidArgumentException('Column "' . $table->getName() . '"."' . $thing->getName() . '" is NotNull, but has empty string or null as default.');
throw new \InvalidArgumentException('Column "' . $table->getName() . '"."' . $thing->getName() . '" is NotNull, but has empty string or null as default.');
}
}
if ($thing->getNotnull() && $thing->getType()->getName() === Types::BOOLEAN) {
if ($this->connection->getDatabasePlatform() instanceof OraclePlatform) {
throw new \InvalidArgumentException('Column "' . $table->getName() . '"."' . $thing->getName() . '" is type Bool and also NotNull, so it can not store "false".');
// Oracle doesn't support boolean column with non-null value
if ($thing->getNotnull() && $thing->getType()->getName() === Types::BOOLEAN) {