Problem/Motivation

The migration script does not take into account the message field could be longer than a 255 length varchar and it fails when trying to save a message of that length. In addition, because there can be multiple emails, sometimes the existing email value is returned as an array.

Steps to reproduce

Run the migration script.

Proposed resolution

For the message field:

  • In content_reminders.schema.yml and content_reminders.install set the message field's
    • type attribute to text
    • size attribute to big
  • In ReminderEntity.php for message field for the baseFieldDefinition create a string_long
  • type

For the returned existing email data:

  • Check if the data returned is an array
  • If the data is an array, implode the array to a string

Data model changes

Updating the message field from varchar (255) to longtext

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

theloneliestmonk created an issue. See original summary.

timozura’s picture

Status: Active » Reviewed & tested by the community

Tested. The database field for the Message field is now long text.

timozura’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

timozura’s picture

Version: 2.0.x-dev » 2.0.0-beta4
Status: Fixed » Closed (fixed)