Laravel遷移工具migration 報錯 tinyInteger 字段類型未定義

問題描述:

開發過程中一直用遷移文件生成數據庫表,字段類型一直都用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)不存在,然後通過獲取查看文件中的所有字段類型發現的確沒有這個字段類型:如下圖字段類型註冊類

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章