Updated the export_sql_users function to prevent duplicate emails from being written into the export file.
Previously, the function was overwriting the file and writing all the emails fetched from the database, regardless of whether they already existed in the file.
The function now checks if the file exists, reads all existing emails into a set, and only writes emails that do not already exist in the file. The file is now opened in append mode to preserve existing emails.
This change optimizes the export process and avoids unnecessary duplication of data, i think 📦
Updated the export_sql_users function to prevent duplicate emails from being written into the export file.
Previously, the function was overwriting the file and writing all the emails fetched from the database, regardless of whether they already existed in the file.
The function now checks if the file exists, reads all existing emails into a set, and only writes emails that do not already exist in the file. The file is now opened in append mode to preserve existing emails.
This change optimizes the export process and avoids unnecessary duplication of data, i think 📦