Added: alter template column so it can accept longer template path - #36
Conversation
| { | ||
| $this->table('email_queue') | ||
| ->changeColumn('template', 'string', [ | ||
| 'limit' => 255, |
There was a problem hiding this comment.
what's the actual longest template name that you have?
There was a problem hiding this comment.
@lorenzo For example: Passbolt/MultiFactorAuthentication.LU/mfa_user_settings_reset
It is 61 chars long, but potentially, it could be longer.
There was a problem hiding this comment.
let's make it 100, otherwise it is not indexable by mysql, in case we need to index it
There was a problem hiding this comment.
Good point. With utf8mb4 collation, it would indeed fail.
"100" seems enough for a template path, and we still have room for more if needed (can go up until 191).
Should we throw an exception if larger or do we let the driver handle it?
There was a problem hiding this comment.
sounds like a good idea (using an exception)
There was a problem hiding this comment.
its done, added doc in README as well
|
Thanks! |
Length of the column
templateis restricted to 50 chars. This is actually too short and will make email with a longer template path failed to be enqueued.It is often that a template path for an email go beyond that limit. For example, while using the plugin syntax in the template.