Skip to content

v2.25.0 — Attachments live in one place

Choose a tag to compare

@jszobody jszobody released this 10 Aug 15:51
· 9 commits to master since this release

A correction to v2.24.0, released the same day.

Attachments live in one place

v2.24.0 moved attachments to their own email_attachments table, and renamed
the old filenames column on email_messages to legacy_attachment_names so
the new relation could take the name.

That was the wrong call. The column is still created by the migration that
builds the table, so a fresh install made the column and renamed it in the same
migrate run — leaving every new install with a column named "legacy" on day
one that could never hold anything.

It's dropped now. Attachments live in email_attachments and only there.

Upgrading

Run php artisan migrate. The drop is guarded and handles every state:

Coming from What happens
A fresh install The column is never created. Nothing to drop.
v2.24.0 legacy_attachment_names is dropped.
v2.23.0 or earlier attachments is renamed, then dropped.

Breaking: EmailMessage::legacyAttachmentNames() is removed, along with
the column behind it. It existed for one release.

The only rows that could have held anything are ones recorded before v2.24.0
with content storage on, and they held filenames only — never the files
themselves. Nothing that was ever stored on disk is affected. If you want to
keep those names, copy them out before migrating:

select id, legacy_attachment_names from email_messages
where legacy_attachment_names is not null
  and legacy_attachment_names != '[]';

Everything else in v2.24.0 — storing attachment bytes, downloads, signed URLs
on cloud disks, the dashboard changes — is unchanged.