SMALLINT breaks SQLite versions trying to upgrade the db for 11.2

Created on 25 June 2025, 12 days ago

Problem/Motivation

I just used composer to upgrade a pretty basic site to 11.2.1 that runs with SQLite. When I tried to use drush to update the database, I got this error:


>  [notice] Update started: system_update_11201
>  [error]  Unable to parse the column type SMALLINT 
>  [error]  Update failed: system_update_11201 
 [error]  Update aborted by: system_update_11201 
 [error]  Finished performing updates. 

This is because SQLite doesn't support the SMALLINT type.

Steps to reproduce

1. Upgrade a site built on SQLite to 11.2.1.
2. Use drush to execute updb.

Proposed resolution

Change the update script to use INTEGER? (I'm not too familiar with how Drupal handles the schema mappings for SQLite. )

πŸ› Bug report
Status

Active

Version

11.2 πŸ”₯

Component

database update system

Created by

πŸ‡ΊπŸ‡ΈUnited States bogdog400

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @bogdog400
  • For complete reproduction steps, what was the version you upgraded from?

  • πŸ‡ΊπŸ‡ΈUnited States bogdog400

    I think 11.1.8. It might have been 11.1.7. I'm not entirely certain.

  • πŸ‡¬πŸ‡§United Kingdom catch
  • πŸ‡ΊπŸ‡ΈUnited States xjm
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    We've definitely got test coverage of this update running on SQLite - see \Drupal\Tests\system\Functional\Update\RouteAliasUpdateTest - this test is running on SQLite. Also SMALLINT is only ever in Drupal's codebase in the mysql and postgres schema classes where we are converting from Drupal's data types to the dbs - the sqlite's equivalent is \Drupal\sqlite\Driver\Database\sqlite\Schema::getFieldTypeMap() and there is no mention of smallint. This report feels like Drupal is trying to use MySQL or PGSQL schema class with SQLite and that's definitely not going to work and I don't know how that could happen. I'd look in your settings.php and check that your database connection info is what you expect... I would also check what drush thinks the database type is using drush status.

  • πŸ‡ΊπŸ‡ΈUnited States xjm

    For #6.

Production build 0.71.5 2024