We can use `TYPE_SMALLINT` for both cases and avoid `if` except for table options.