Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 2.24 KB

File metadata and controls

43 lines (29 loc) · 2.24 KB

Usage

This IbexaMailing Bundle is the upgraded version of CJW Newsletter and Ez Mailing bundles. After the bundle is installed within Ez Platform which already contains one of those old bundles the database can be migrated to the new Bundle.

  1. If the old bundle is CJW Newletter run the following commands inside ezplatform folder:

    • php bin/console ibexamailing:migrate:cjwnl --export
    • php bin/console ibexamailing:migrate:cjwnl --import
  2. If the old bundle is Ez Mailing run the following commands inside ezplatform folder:

    • php bin/console ibexamailing:migrate:ibexamailing --export
    • php bin/console ibexamailing:migrate:ibexamailing --import

The first one exports the data from the old database to json files. The second one imports the data from json files to the new database. After that the dumped data is still in the json files inside web/var/site/files/migrate/cjwnl folder split between folders campaign, list, user. They can be removed manually if they are not needed anymore.

What the migration script does:

  1. When migrating from CJW Newsletter:

    • It takes the records from the list table to create the mailing lists and campaigns of them.
    • As each record is related to some Ez Content it selects the record with the latest version for each content due to contentobject_attribute_version field.
    • Then we take the mailings from edition_send table for each campaign fetched from the list table before.
    • After that the users with subscriptions are saved but only those subscriptions which have the list_contentobject_id value that exists among list records.
  2. When migrating from Ez Mailing:

    • It takes the the records from the old tables with mailing lists, campaigns and users, but only those which don't have status draft.
    • We take and save only those subscriptions for the users which are related to existing mailing lists.
    • We don't migrate amy mailings here because there is not enough data for that.

There is also the option for both cases to truncate the current IbexaMailing Bundle tables in the database:

  • php bin/console ibexamailing:migrate:cjwnl --clean

or

  • php bin/console ibexamailing:migrate:ibexamailing --clean