Long pdfs fail as they can't set the page data in the import table
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3579486. -->
Reported by: [andybroomfield](https://www.drupal.org/user/636756)
Related to !27 !19
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When importing a really large pdf, like....<br>
<a href="https://www.brighton-hove.gov.uk/sites/default/files/2026-02/Public%20reports%20pack%2019022026%201630%20People%20Overview%20Scrutiny.pdf">https://www.brighton-hove.gov.uk/sites/default/files/2026-02/Public%20reports%20pack%2019022026%201630%20People%20Overview%20Scrutiny.pdf</a></p>
<p>This will fail in the import with the following message:<br>
SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xACtivet...' for column 'pages' at row 1</p>
<p>This happens because the table column type in the localgov_imports table page column is longtext.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Try and import a really large PDF (lots of pages). Example above.<br>
Verify the error appears.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>I had success by changing the column type from longtext to longblob.<br>
I notice several Drupal table columns that store serialized data such as key_value use longblob also.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>Write an update hook and change the schema.</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>- Pages column in localgov_imports will be longblob.</p>
issue