Skip to content

Allow specific column type#1071

Open
Erwane wants to merge 1 commit intocakephp:5.xfrom
Erwane:1068-add-specific-type
Open

Allow specific column type#1071
Erwane wants to merge 1 commit intocakephp:5.xfrom
Erwane:1068-add-specific-type

Conversation

@Erwane
Copy link
Copy Markdown

@Erwane Erwane commented Apr 17, 2026

Allow addition of specific adapter column type.

@dereuromark
Copy link
Copy Markdown
Member

dereuromark commented Apr 17, 2026

Refs #1068

Small issue: SqliteAdapter silently ignores the registration

The PR puts $specificColumnTypes + addSpecificColumnType() on AbstractAdapter, implying universal support. But I checked all four adapters' getColumnTypes():

  • MysqlAdapter.php:1335 — array_merge(parent::getColumnTypes(), static::$specificColumnTypes) ✓
  • PostgresAdapter.php:1172 — same pattern ✓
  • SqlserverAdapter.php:1076 — same pattern ✓
  • SqliteAdapter.php:1664 — return array_keys(static::$supportedColumnTypes) — different property, no merge

So SqliteAdapter::addSpecificColumnType('foo') writes to AbstractAdapter::$specificColumnTypes (via LSB, since Sqlite doesn't redeclare it) and then isValidColumnType() never consults that list. Silent no-op on Sqlite. Either fix Sqlite to also merge, or keep the API Postgres/MySQL/SqlServer-only and document that.

@dereuromark dereuromark added this to the 5.next milestone Apr 17, 2026
@dereuromark
Copy link
Copy Markdown
Member

Should also target 5.next

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants