PHOT-22: new sql data for images and collections