[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 0bc59f1b9a
commit e7f541219d
3 changed files with 31 additions and 29 deletions

View File

@@ -9,17 +9,18 @@ define('ROOT', dirname(__DIR__));
require ROOT . '/vendor/autoload.php';
const types = [
'blob' => '',
'bool' => 'bool',
'char' => 'string',
'datetime' => '\DateTimeInterface',
'timestamp' => '\DateTimeInterface',
'html' => 'string',
'int' => 'int',
'numeric' => 'float',
'serial' => 'int',
'text' => 'string',
'varchar' => 'string',
'blob' => '',
'bool' => 'bool',
'char' => 'string',
'datetime' => '\DateTimeInterface',
'timestamp' => '\DateTimeInterface',
'html' => 'string',
'int' => 'int',
'numeric' => 'float',
'serial' => 'int',
'text' => 'string',
'varchar' => 'string',
'phone_number' => 'PhoneNumberType',
];
$path = Yaml::parseFile(ROOT . '/config/services.yaml')['services']['app.core.schemadef_driver']['arguments'][0];