Use logged_query instead of cr.execute in ht_expense migration