Moved to pg instead of sqlite