This also makes batch of schema updates to single table use transaction,
which should help in not leaving table in inconsistent state if some update
steps fails (unless you use mysql where you can't rollback changes to
table schemas).
lists:search is available since OTP 21.0, and ejabberd is said to
support since OTP 20.0.
Also, that code wouldn't work if ejabberd uses different database types
(MySQL, PgSQL, ...), as this would only update the first database.