updated to use pg in production and sqlite3 in development