TLDR; I want to clean my CRM Database, especially the duplicate entries on the email_conversation table.
This simple application is merely just find duplicate entries when testing the database functionality for my other project. The steps are as simply as:
- Find the entities that duplicated (email_trace_id as the key).
- Find the associated Ids of the duplicated email_trace_id for the email_conversation database, and save one for future exclusion.
- Delete all duplicated entries except with the ids that has been saved earlier in the step 2.
This is my first and only attempt to try zig, expect some sloppy implementation since this is just experimental.
- Zig version 0.11.0.
- PostgreSql version 15 >.
- pgz : Postgres driver written in pure zig
Note: Since Zig build system (version 0.11.0) requires tar.gz, I clone then tag it to publish the
"temporary version"
that I can pull for my dependency.
zig-build
zig-out/bin/crmdb-cleaner