Skip to content

Conversation

@DGoel1602
Copy link
Contributor

Why

Getting good data into our DB to be used for deving has been a pain forever so we needed a seeding script.

What

This introduces a seeding script and cron job that backs up the prod db (minus all sensitive information) and makes a backup sql file to insert those rows into our local db and saves it on our minio client. The seeding script can then pull this sql script and then fill the local rows with prod data that is fine for the dev team to have.

Test Plan

Idk man there's too many moving parts to take a video or screenshot just ask me lowk 🙏 Ofc feel free to lmk if the usage is too confusing I'll improve the docs and stuff

Copy link
Contributor

@DVidal1205 DVidal1205 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work, just can never fully trust Discord

@cataladev
Copy link
Contributor

@DVidal1205 u should review this 💯

Copy link
Contributor

@hector1128 hector1128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few tweaks but overall very solid. Good job Dhruv

Copy link
Contributor

@farisAwheel farisAwheel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ima give it the LGTM! i was about to say wrap the discord API calls w/ try catch but dylan beat me to it

went on a wild goose chase with ensuring that cleanTable actually gets everything, there are some tables that should be cleared but don't have a direct FK w/ the user table, just have an indirect link, but from what i checked, all of affected tables have a link to member which cascades on delete, so it should be fine

@DVidal1205 DVidal1205 dismissed stale reviews from hector1128 and themself January 21, 2026 14:40

finished

Copy link
Contributor

@DVidal1205 DVidal1205 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!!!!!

@DGoel1602 DGoel1602 added this pull request to the merge queue Jan 21, 2026
Merged via the queue into main with commit d1b7d73 Jan 21, 2026
5 checks passed
@DGoel1602 DGoel1602 deleted the db/seeding branch January 21, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants