In Laravel 9, in database migration, modify the field type UnsignedtinyInteger, and an error is reported: Unknown column type “TinyInteger” requested.
1. In Laravel 9, in the database migration, modify the field type unsignedtinyInteger, and report an error: unknown column type “tinyInteger” requested. as shown in Figure 1
$table->unsignedTinyInteger('status')->default(1)->comment('状态,1:待处理;2:处理中;3:可换单;4:已完成')->change();
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. Since Laravel’s schema builder updates the field attribute, the field type is not supported: unsignedtinyInteger, so you need to use the native sql statement
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. Execute the migration and update successfully, as shown in Figure 2
`status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态,1:待处理;2:处理中;3:可换单;4:已完成',

