Enable support for jsonb field types

Adds a function to PostgreSQLSchemaManager.php to allow for FieldTypes that specify "json" as their type.  Doing so will create a jsonb column in the database, which is better for jsonpath value retrieval than it's regular json counterpart.
This commit is contained in:
Ian Walls 2020-10-28 10:57:08 -04:00 committed by GitHub
parent a7c3450d43
commit 6b7eb1cc6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -1246,6 +1246,17 @@ class PostgreSQLSchemaManager extends DBSchemaManager
{
return "decimal(4,0)";
}
/*
* Return a JSON Binary field type (better for searching than a plain JSON type)
*
* @param array $values Contains a tokenised list of info about this data type
* @return string
*/
public function json($values)
{
return "jsonb";
}
/**
* Create a fulltext search datatype for PostgreSQL