diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-11-15 04:19:33 -0800 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-11-15 04:19:33 -0800 |
commit | 630e46f60a7ac43815d14dd3d224de8ae3038465 (patch) | |
tree | 166c1e41ac2ea234ffece0ca431f9bce9e35979a /lib/private/db/mdb2schemareader.php | |
parent | 16dce5191751e0e6b394fc5cc58690a77dc82870 (diff) | |
parent | 53f17a71d1eedc5a520874b40b51890fa5559d4d (diff) | |
download | nextcloud-server-630e46f60a7ac43815d14dd3d224de8ae3038465.tar.gz nextcloud-server-630e46f60a7ac43815d14dd3d224de8ae3038465.zip |
Merge pull request #5789 from ogasser/db_fix_default_for_numeric
DB: Set correct default value for numeric types
Diffstat (limited to 'lib/private/db/mdb2schemareader.php')
-rw-r--r-- | lib/private/db/mdb2schemareader.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/db/mdb2schemareader.php b/lib/private/db/mdb2schemareader.php index ad4c39a9935..511bd1c90bd 100644 --- a/lib/private/db/mdb2schemareader.php +++ b/lib/private/db/mdb2schemareader.php @@ -150,6 +150,9 @@ class MDB2SchemaReader { case 'timestamp': $type = 'datetime'; break; + case 'numeric': + $type = 'decimal'; + break; } break; case 'length': @@ -193,7 +196,7 @@ class MDB2SchemaReader { } else { $options['default'] = ''; } - if ($type == 'integer') { + if ($type == 'integer' || $type == 'decimal') { $options['default'] = 0; } elseif ($type == 'boolean') { $options['default'] = false; |