問題描述:
開發過程中一直用遷移文件生成數據庫表,字段類型一直都用tinyInteger類型,在php artisan migrate
的時候,拋出一下異常
報錯信息:
Unknown column type "tinyinteger" requested.
Any Doctrine type that you use has to be registered with \Doctrine\DBAL\Types\Type::addType().
You can ge t 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 AbstractP latform#registerDoctrineTypeMapping() or have your custom types implement Type#getMappedDatabaseTypes().
If the type name is empty you might have a pr oblem with the cache or forgot some mapping information.
錯誤信息:錯誤信息大致的意思執行的遷移文件字段類型(tinyIntger)不存在,然後通過獲取查看文件中的所有字段類型發現的確沒有這個字段類型:如下圖字段類型註冊類