Modify migration to set proper state for photos and documents