Fixes #1485 SQLite rand() function needs to be random()

Fixes #1485