If you have an error in the type name in a schema definition, Drupal doesn't detect it. Instead, at least with MySQL, you get a SQL error, and MySQL's syntax error reporting is less than ideal.
For example, I entered 'type' => 'integer' in one of my column definitions in an install file. (I've been doing a lot of Propel, which uses integer instead of int.) Because of the way the error was reported and formatted out of MySQL, I spent a lot of time barking up the wrong tree.
I believe that for both MySQL and PostgresSQL, Drupal just does a quick lookup in a map table, in the corresponding _db_process_field function. It doesn't check whether the type is actually set in the map or whether the resulting type string is non-empty. However, I'm not sure whether the correct solution is to simply call watchdog here to emit a warning or error message, or to do it at a higher level.
Comments
Comment #1
oadaeh commentedI spent quite some time earlier today bashing my head against this problem. When I get some free time(tm), I'm going to see if this is still an issue in 7.x, and if so, start the fixing process there.
Comment #2
NROTC_Webmaster commentedoadaeh,
If you are going to try to get this in it will have to go in D8, but I think the right answer is works as designed.