SQL: move df.to_sql to generic + update with new functionality