Updated update query and set has_time to boolean.