exp:ezconvertdbcharset
Available before Exponential 6: the 4.x kernel had it already; the 4.x reference had no page for it.
Summary
Convert all Exponential database tables to use UTF-8 character set
Usage
./console exp:ezconvertdbcharset [options] php bin/php/ezconvertdbcharset.php [options]
Help
The output of ./console help exp:ezconvertdbcharset (the script run with --help), without the standard options:
Usage: bin/php/ezconvertdbcharset.php [OPTION]...
Changes your Exponential database tables to use UTF8
Options:
--extra-xml-attributes=VALUE specify custom attributes which store its data in xml.
usage: <datatype_string>[.<table>.<field>][,<datatype_string>.<table>.<field>...].
default table is 'ezcontentobject_attribute', default data field is 'data_text'
note: your custom table must have 'id', 'version' and 'data_type_string' fields.
--extra-xml-data=VALUE specify custom xml data.
usage: <table>.<field>[,<table>.<field>...].
note: your custom table must have 'id' field.
--extra-serialized-data=VALUE specify custom serialized data.
usage: <table>.<field>;<key_field1>[.<key_field2>....][,<table>.<field>...].
ex: mytable.data_text;id.version,mytable2.data;id
--collation=VALUE specify collation for converted db. default is 'utf8_general_ci'
--skip-class-translations Content class translations were added in Exponential 3.9. Use this options if upgrading from early version.
--iconv-character-set=VALUE This setting is used when characters are converted by iconv(). This settings is typically needed when a character set is not called the same by the database and iconv. An example is "windows-1252" (iconv) and "iso-8859-1" (mysql 5)
--log-filename=VALUE Specify a file where iconv conversions will be logged toOptions
| Option | Value | Description |
|---|---|---|
| --extra-xml-attributes | required | specify custom attributes which store its data in xml. usage: <datatype_string>[.<table>.<field>][,<datatype_string>.<table>.<field>...]. default table is 'ezcontentobject_attribute', default data field is 'data_text' note: your custom table must have 'id', 'version' and 'data_type_string' fields. |
| --extra-xml-data | required | specify custom xml data. usage: <table>.<field>[,<table>.<field>...]. note: your custom table must have 'id' field. |
| --extra-serialized-data | required | specify custom serialized data. usage: <table>.<field>;<key_field1>[.<key_field2>....][,<table>.<field>...]. ex: mytable.data_text;id.version,mytable2.data;id |
| --collation | required | specify collation for converted db. default is 'utf8_general_ci' |
| --skip-class-translations | - | Content class translations were added in Exponential 3.9. Use this options if upgrading from early version. |
| --iconv-character-set | required | This setting is used when characters are converted by iconv(). This settings is typically needed when a character set is not called the same by the database and iconv. An example is "windows-1252" (iconv) and "iso-8859-1" (mysql 5) |
| --log-filename | required | Specify a file where iconv conversions will be logged to |
Standard options
Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.
Source
bin/php/ezconvertdbcharset.php, kernel/private/classes/commands/ezconvertdbcharset.php
See also
Generated example: exp:ezconvertdbcharset
Added to the reference for Exponential 6.0.15.
Contributors
- Graham Brookins Updated
Comments
Add a comment