Fix deprecation warnings for set_table_name and set_primary_key