Class MigrateTranslatableTask
Migrates the old Translatable datamodel introduced in SilverStripe 2.1 to the
new schema introduced in SilverStripe 2.3.2. Just works for SiteTree
records and subclasses. If you have used the Translatable extension on other
DataObject subclasses before, this script won't migrate them
automatically.
Limitations
- Information from the
Versionedextension (e.g. in "SiteTree_versions" table) will be discarded for translated records. - Custom translatable fields on your own
Pageclass or subclasses thereof won't be migrated into the translation. - 2.1-style subtags of a language (e.g. "en") will be automatically
disambiguated to their full locale value (e.g. "en_US"), by the lookup defined
in
i18n::get_locale_from_lang(). - Doesn't detect published translations when the script is run twice on the same data set
Usage
PLEASE BACK UP YOUR DATABASE BEFORE RUNNING THIS SCRIPT.
Warning: Please run dev/build on your 2.2 database to update the schema before running this task. The dev/build command will rename tables like "SiteTree_lang" to "_obsolete_SiteTree_lang".
Commandline
Requires "sake" tool (see http://doc.silverstripe.com/?id=sake) <example> sake dev/tasks/MigrateTranslatableTask </example>Browser
<example> http://mydomain.com/dev/tasks/MigrateTranslatableTask </example>Methods summary
public
|
|
public
|
Methods inherited from BuildTask
getDescription(),
getTitle(),
isEnabled()
Methods inherited from Object
__call(),
__construct(),
__toString(),
__wakeup(),
addMethodsFrom(),
addStaticVars(),
addWrapperMethod(),
add_extension(),
add_static_var(),
allMethodNames(),
cacheToFile(),
cacheToFileWithArgs(),
clearCache(),
combined_static(),
create(),
createMethod(),
create_from_string(),
defineMethods(),
exists(),
extInstance(),
extend(),
getCustomClass(),
getExtensionInstance(),
getExtensionInstances(),
get_extensions(),
get_static(),
hasExtension(),
hasMethod(),
has_extension(),
invokeWithExtensions(),
is_a(),
loadCache(),
parentClass(),
parse_class_spec(),
remove_extension(),
sanitiseCachename(),
saveCache(),
set_stat(),
set_static(),
set_uninherited(),
stat(),
strong_create(),
uninherited(),
uninherited_static(),
useCustomClass()
Magic methods summary
Properties summary
protected
string
|
$title |
#
$title Shown in the overview on the |
protected
string
|
$description |
#
$description Describe the implications the task has, and the changes it makes. Accepts HTML formatting. |