-
Notifications
You must be signed in to change notification settings - Fork 643
transfer_crates script: switch to GitHub IDs #858
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
transfer_crates script: switch to GitHub IDs #858
Conversation
@vignesh-sankaran Can you rebase this please? Something funky happened with your branch setup. Shouldn't need 10 commits for a 7 line change |
Hi @vignesh-sankaran, sorry it's taken me so long to review this! Yes, as sgrif mentioned, please rebase on rust-lang/crates.io master and force push to this branch to get rid of all the merge commits-- please let me know if you have questions about how to do that! Regarding some of the comments you had on the last PR:
That's fine
I think that's because when the crate_owners table used to have an id column, and this script used the crate_owners id instead of the owner_id, then this script would update one record each time through the
I believe this is for when someone has created a new github account and wants to transfer all their crates from the old account to the new account. I don't think this happens very often anymore (I don't think I've ever needed to run this script), but there's still a possibility of needing to do this. And actually, now that I think about it, because we're now using github ids and we have a uniqueness constraint on github id, the warning in this script will always be printed.... I think it's fine though :) Thank you! 🌷 🌻 |
@carols10cents I've implemented the changes as requested :) |
Moved update statement outside for loop and removed singular crate owner transfer assert.
src/bin/transfer-crates.rs
Outdated
} | ||
|
||
let _ = tx.execute( |
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.
I don't think we need the let _ =
at all here anymore; the .unwrap()
should make sure the result is getting used :) Could you remove let _ =
here please? Thank you!!
Removed `let _ =` on database transaction
Thank you!!! 🍰 💃 🌊 |
Redo of #798, learned not to use master for PR's :)