Fix syntax on touches for SQLite and Postgres. Closes #1221.