[DATABASE][TOOLS] Update local_user, SchemaDefDriver and bin/generate_entity_fields to use the phone_number type (which maps to a varchar 35 and does validation)

This commit is contained in:
Hugo Sales
2020-07-26 00:18:15 +00:00
committed by Hugo Sales
parent db52e282b9
commit db32a5fcfc
3 changed files with 31 additions and 29 deletions

View File

@@ -40,17 +40,18 @@ class SchemaDefDriver extends StaticPHPDriver
* V2 DB type => Doctrine type
*/
private const types = [
'varchar' => 'string',
'char' => 'string', // char is a fixed witdh varchar
'int' => 'integer',
'serial' => 'integer',
'tinyint' => 'smallint', // no portable tinyint
'bigint' => 'bigint',
'bool' => 'boolean',
'numeric' => 'decimal',
'text' => 'text',
'datetime' => 'datetime',
'timestamp' => 'datetime',
'varchar' => 'string',
'char' => 'string', // char is a fixed witdh varchar
'int' => 'integer',
'serial' => 'integer',
'tinyint' => 'smallint', // no portable tinyint
'bigint' => 'bigint',
'bool' => 'boolean',
'numeric' => 'decimal',
'text' => 'text',
'datetime' => 'datetime',
'timestamp' => 'datetime',
'phone_number' => 'phone_number',
// Unused in V2, but might start being used
'date' => 'date',
'time' => 'time',