Use SMALLINT instead of TINYINT(1)

Having the datatype TINYINT(1) makes the script incompatible with postgresql. Using SMALLINT instead, and the script works with both mysql and postgresql.