From 3b0d0e2b1f3fec67e18402b0b0ecaf03dcb6fed8 Mon Sep 17 00:00:00 2001
From: Oliver Gasser <oliver@flowriver.net>
Date: Tue, 17 Dec 2013 22:46:45 +0100
Subject: DB: Support DECIMAL(precision,scale) syntax in XML

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 | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'lib')

diff --git a/lib/private/db/mdb2schemareader.php b/lib/private/db/mdb2schemareader.php
index 511bd1c90bd..b1fd2454cb0 100644
--- a/lib/private/db/mdb2schemareader.php
+++ b/lib/private/db/mdb2schemareader.php
@@ -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());
 
-- 
cgit v1.2.3