Skip to content
Permalink
Browse files

Adding support to parsing json columns in potgres

  • Loading branch information...
lorenzo committed Mar 19, 2016
1 parent 46c3fca commit 518ac1bcf405ed36987bbadd05eb97ebe3843fd5
Showing with 9 additions and 0 deletions.
  1. +5 −0 src/Database/Schema/PostgresSchema.php
  2. +4 −0 tests/TestCase/Database/Schema/PostgresSchemaTest.php
@@ -129,6 +129,11 @@ protected function _convertColumn($column)
) {
return ['type' => 'decimal', 'length' => null];
}
if (strpos($col, 'json') !== false) {
return ['type' => 'json', 'length' => null];
}
return ['type' => 'text', 'length' => null];
}
@@ -200,6 +200,10 @@ public static function convertColumnProvider()
'DOUBLE PRECISION',
['type' => 'float', 'length' => null]
],
[
'JSON',
['type' => 'json', 'length' => null]
],
];
}

0 comments on commit 518ac1b

Please sign in to comment.
You can’t perform that action at this time.