Schema::table('theme_installation_task', function (Blueprint $table) {
$table->unsignedTinyInteger('step')->default(0)->comment('步骤,1:排队中;2:下载 ZIP;3:解压缩 ZIP;4:执行安装命令;5:复制主题文件;6:同步主题的素材至CDN')->change();
});

Doctrine\DBAL\Exception : 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.
at E:\wwwroot\object\vendor\doctrine\dbal\lib\Doctrine\DBAL\DBALException.php:282
278| * @return Exception
279| */
280| public static function unknownColumnType($name)
281| {
> 282| return new Exception('Unknown column type "' . $name . '" requested. Any Doctrine type that you use has ' .
283| 'to be registered with \Doctrine\DBAL\Types\Type::addType(). You can get a list of all the ' .
284| 'known types with \Doctrine\DBAL\Types\Type::getTypesMap(). If this error occurs during database ' .
285| 'introspection then you might have forgotten to register all database types for a Doctrine Type. Use ' .
286| 'AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement ' .
Exception trace:
1 Doctrine\DBAL\DBALException::unknownColumnType("tinyinteger")
E:\wwwroot\object\vendor\doctrine\dbal\lib\Doctrine\DBAL\Types\TypeRegistry.php:37
2 Doctrine\DBAL\Types\TypeRegistry::get("tinyinteger")
E:\wwwroot\object\vendor\doctrine\dbal\lib\Doctrine\DBAL\Types\Type.php:237
Please use the argument -v to see more details.
Schema::table('theme_installation_task', function (Blueprint $table) {
$table->dropColumn('step');
$table->unsignedTinyInteger('step')->default(0)->after('processing_failed')->comment('步骤,1:排队中;2:下载 ZIP;3:解压缩 ZIP;4:执行安装命令;5:复制主题文件;6:同步主题的素材至CDN');
});
![报错:Illuminate\Database\QueryException : SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'step' 。](https://media.shuijingwanwq.com/2022/07/2-8.png)
Illuminate\Database\QueryException : SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'step' (SQL: alter table `theme_installation_task` add `step` tinyint unsigned not null default '0' comment '步骤,1:排队中;2:下载 ZIP;3:解压缩 ZIP;4:执行安装命令;5:复制主题文件;6:同步主题的素材至CDN' after `processing_failed`)
at E:\wwwroot\object\vendor\laravel\framework\src\Illuminate\Database\Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error
666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {
> 669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|
Exception trace:
1 Doctrine\DBAL\Driver\PDO\Exception::("SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'step'")
E:\wwwroot\object\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDO\Exception.php:18
2 Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException))
E:\wwwroot\object\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php:119
Please use the argument -v to see more details.
Schema::table('theme_installation_task', function (Blueprint $table) {
$table->dropColumn('step');
});
Schema::table('theme_installation_task', function (Blueprint $table) {
$table->unsignedTinyInteger('step')->default(0)->after('processing_failed')->comment('步骤,1:排队中;2:下载 ZIP;3:解压缩 ZIP;4:执行安装命令;5:复制主题文件;6:同步主题的素材至CDN');
});
PHP / Laravel / Yii2 老项目维护与长期技术支持
如果你的 PHP / Laravel / Yii2 项目已经上线,但遇到原开发离职、Bug 长期无人修复、接口不稳定、性能下降、代码难以接手等问题,可以联系我做一次远程技术排查。
适合以下情况:
✅ 老旧 PHP 系统无人维护
✅ Laravel / Yii2 项目 Bug 修复
✅ 后台管理系统小功能迭代
✅ RESTful API 接口排查
✅ MySQL / Redis / Nginx 性能问题
✅ 长期远程兼职维护
可先从一次小问题开始:
✅ 线上报错排查
✅ 接口异常分析
✅ 慢查询与性能瓶颈定位
✅ 代码结构初步评估
✅ 部署环境与日志检查
如需咨询,请联系我,并注明:PHP 维护咨询。
联系方式:
Telegram:@shuijingwan
微信:13980074657
邮箱:shuijingwanwq@gmail.com

发表回复