Important

You are browsing the documentation for version 4.2 of OroCommerce, OroCRM and OroPlatform, which is no longer maintained. Read version 5.1 (the latest LTS version) of the Oro documentation to get up-to-date information.

See our Release Process documentation for more information on the currently supported and upcoming releases.

Schema Migrations

Class: Oro\Bundle\TranslationBundle\Migration\DeleteTranslationKeysQuery

Provides a useful way to delete custom translation keys during migration.

Arguments:

  • domain (string) - domain of translation keys to process removal by

  • translationKeys (array) - an array of translation key strings to remove

Example:

To remove custom keys in your migration, use method addQuery of Oro\Bundle\MigrationBundle\Migration\QueryBag.

$queryBag->addQuery(
    new Oro\Bundle\TranslationBundle\Migration\DeleteTranslationKeysQuery(
        'custom_domain',
        ['translation.key1.to.remove', 'translation.key2.to.remove' ]
    )
);

An Oro\Bundle\MigrationBundle\Migration\QueryBag instance is usually available in Oro\Bundle\MigrationBundle\Migration\Migration::up method as second argument.

See migration details for more information.