Skip to content
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

Add method to update the latest index when a CPAN module is uploaded #22

Open
preaction opened this issue Jun 2, 2018 · 0 comments
Open

Comments

@preaction
Copy link
Member

preaction commented Jun 2, 2018

Every time a record is written to the uploads table, we need to make sure that the ixlatest table is up-to-date. This is the most common thing to do when inserting new records, so we should make it easy.

Make a method in CPAN::Testers::Schema::ResultSet::Upload called insert_index that inserts the new upload into the database, and then also updates the correct row in CPAN::Testers::Schema::Result::LatestIndex (but only if the upload is newer, see the existing backend code for when ixlatest is updated).

The method should then return the new CPAN::Testers::Schema::Result::Upload object.

This method is required for the CPAN Testers backend (cpan-testers/cpantesters-backend#13), and also makes syncing data from the database easier (#20)

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

No branches or pull requests

1 participant