-
Notifications
You must be signed in to change notification settings - Fork 52
Db/seeding #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Db/seeding #296
Conversation
DVidal1205
left a comment
There was a problem hiding this 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
|
@DVidal1205 u should review this 💯 |
hector1128
left a comment
There was a problem hiding this 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
farisAwheel
left a comment
There was a problem hiding this 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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!!!!!
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