Added to_sql() for DiscreteVariable.