Skip to content

Commit 35b80e7

Browse files
abnegateclaude
andcommitted
fix(sqlite): map declared INTEGER columns to dataType 'int'
SQLite accepts both INT and INTEGER as type names but MariaDB's INFORMATION_SCHEMA always reports `int`. Tests assert against the MariaDB shape, so canonicalise INTEGER → int in parseSqliteColumnType to keep getSchemaAttributes parity with the parent contract. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0efc518 commit 35b80e7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/Database/Adapter/SQLite.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2439,6 +2439,12 @@ private function parseSqliteColumnType(string $declaration): array
24392439
}
24402440

24412441
$dataType = \strtolower($base);
2442+
// SQLite spells INT and INTEGER interchangeably for declared types,
2443+
// but MariaDB's INFORMATION_SCHEMA always reports `int`. Canonicalise
2444+
// so getSchemaAttributes matches the parent contract.
2445+
if ($dataType === 'integer') {
2446+
$dataType = 'int';
2447+
}
24422448

24432449
$result = [
24442450
'dataType' => $dataType,

0 commit comments

Comments
 (0)