compatibility with external DISAL database : adding type for mysql and using local db for last timestamp