Not a bug xf-dev:generate-schema-entity don't correctly generates creating UInt columns

Kruzya

Well-known member
Affected version
2.2.8 Patch 1
As said in title.

Column has a type \XF\Mvc\Entity\Entity::UINT, and i expect generating schema like:
PHP:
$this->createTable('table_name', function (\XF\Db\Schema\Create $table)
{
    $table->addColumn('my_column', 'int')->unsigned();
});

What i receive:
PHP:
$this->createTable('table_name', function (\XF\Db\Schema\Create $table)
{
    $table->addColumn('my_column', 'int');
});

Command just generates a int column without unsigned attribute.
1648922785251.png
 

Jeremy P

XenForo developer
Staff member
Numerical columns are unsigned by default. You would have to explicitly call unsigned(false) if you needed a signed column.
 
Last edited:
Top