ez projects / dbattributeconverter
|UNIX name||Owner||Status||Version||Compatible with|
Extension comes with GUI wizard, that helps to prepare conversion. During this process user can select source attribute and target new datatype. Wizard allows also to select additional options depending on source & target datatype.
Conversion between each datatypes is done by separate convert handlers. That are special classes that extends common class and takes care of specific data transformation between datatypes for both class attribute and object atrributes.
Currently just few most typical convert handlers are available, like ezsting to eztext or ezdate to ezdatetime. For more infos check converthandlers/ folder or attributeconverter.ini.append.php file.
Generall usage instructions
You can access wizard by new tab visible in admin interface after enabling this extension, or just by uri: attributeconverter/wizard Remember! Always backup your database before aunching this script!
Convesion process can be launched in three ways:
1. Directly in GUI, if only number of attributes is not to big. My tests says
that it's safe on even avarange speed server to convert a few thousands
attributes just in less than 10 seconds. Number of attributes is always
displayed before conversion. Just remember that all exising attributes will
be converted, it means for all language version and of all archived
versions. To decrease this number be sure to remove unnecessary data before
An antitimeout protection has been added (taken from ezscriptmonitor), that
detects possible timeout, breaks scripts and force user to launch process
in background (or automaticly schedule ezscriptmonitor if installed).
2. It's also possible to store wizard configuration and execute conversion from
command line. To do this, wizard will return special 4 signs code, that must
be passed to the command line. Here is example:
php extension/bin/converter.php -s [site_access] --filename-part xxxx
This way you can create more than one conversion with wizard, and launch
them later from command line. Just be sure you don't convert the same
attribute more than once!
3. Last method is the most comfortable, it use eZScriptMonitor that schedule
and launch process in background. It also provides simple view to monitor
script status (not launched, running, dead or finished).
After conversion it can be needed to clear all cache and run content