Skip to content

Commit 00c5b0d

Browse files
github-actions[bot]claude
authored andcommitted
fix(sqlite): declare _tenant as INT(11) UNSIGNED for schema parity
testSchemaAttributes expects the shared-tables _tenant column to report dataType=int and columnType in [int unsigned, int(11) unsigned], to match what MariaDB's INFORMATION_SCHEMA returns. The previous INTEGER declaration came back from PRAGMA as 'integer', which parseSqliteColumnType mapped to dataType=integer. Declaring the column with the quoted MariaDB shape makes PRAGMA echo it back verbatim — INTEGER affinity is preserved because the type still contains "INT". Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 35b80e7 commit 00c5b0d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Database/Adapter/SQLite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public function createCollection(string $name, array $attributes = [], array $in
163163
$attributeStrings[$key] = "`{$attrId}` {$attrType}, ";
164164
}
165165

166-
$tenantQuery = $this->sharedTables ? '`_tenant` INTEGER DEFAULT NULL,' : '';
166+
$tenantQuery = $this->sharedTables ? '`_tenant` "INT(11) UNSIGNED" DEFAULT NULL,' : '';
167167

168168
$collection = "
169169
CREATE TABLE {$this->getSQLTable($id)} (

0 commit comments

Comments
 (0)