changed SQLite to postgresql database