1. In Laravel 9, when modifying a column type to unsignedTinyInteger in a database migration, an error occurs: Unknown column type “tinyinteger” requested. See Figure 1.

PHP
$table->unsignedTinyInteger('status')->default(1)->comment('状态,1:待处理;2:处理中;3:可换单;4:已完成')->change();
Plaintext
Unknown column type "tinyinteger" requested. Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list of all the known types with \Doctrine\DBAL\Types\Type::getTypesMap(). If this error occurs during database introspection then you might have forgotten to register all database types for a Doctrine Type. Use AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement Type#getMappedDatabaseTypes(). If the type name is empty you might have a problem with the cache or forgot some mapping information.
2. Because Laravel’s Schema builder does not support the column type unsignedTinyInteger when updating column attributes, you need to use raw SQL statements.
PHP
use Illuminate\Support\Facades\DB;
DB::statement("ALTER TABLE return_orders MODIFY status tinyint unsigned NOT NULL DEFAULT 1 COMMENT '状态,1:待处理;2:处理中;3:可换单;4:已完成'");
3. Run the migration, and the update succeeds, as shown in Figure 2.

SQL
`status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态,1:待处理;2:处理中;3:可换单;4:已完成',
