]> source.dussan.org Git - nextcloud-server.git/commitdiff
DB: Support DECIMAL(precision,scale) syntax in XML
authorOliver Gasser <oliver@flowriver.net>
Tue, 17 Dec 2013 21:46:45 +0000 (22:46 +0100)
committerOliver Gasser <oliver@flowriver.net>
Tue, 17 Dec 2013 21:46:45 +0000 (22:46 +0100)
Add support for specifying the precision and scale of a decimal data
type to the XML description language.

See owncloud/core#6475

lib/private/db/mdb2schemareader.php

index 511bd1c90bd85921f83536e65bf329dd369b28f5..b1fd2454cb00f02e6776df3352d43fc7e6f7440b 100644 (file)
@@ -183,6 +183,14 @@ class MDB2SchemaReader {
                                        $primary = $this->asBool($child);
                                        $options['primary'] = $primary;
                                        break;
+                               case 'precision':
+                                       $precision = (string)$child;
+                                       $options['precision'] = $precision;
+                                       break;
+                               case 'scale':
+                                       $scale = (string)$child;
+                                       $options['scale'] = $scale;
+                                       break;
                                default:
                                        throw new \DomainException('Unknown element: ' . $child->getName());