Fix for id type fail.
Use MBTiles write api to support transactions.