cpan-testers / cpantesters-project

A meta-project for tracking CPAN Testers project goals
6 stars 1 forks source link

Make DBIx::Class schema for cpantesters database #12

Open preaction opened 7 years ago

preaction commented 7 years ago

It would be nice to have DBIx::Class schemas for the CPANTesters database. These schemas would provide both an API and documentation onto the data contained in the database.

This schema should focus on the cpanstats database, which contains the core data that CPANTesters uses to provide the web application. This is the data that users would be primarily concerned about having an API for.

The schema module should be named CPAN::Testers::Schema and follow the standard DBIx::Class naming conventions.

https://github.com/cpan-testers/cpantesters-schema

ureesoriano commented 7 years ago

Pushed an initial version of the Schema.

Important: most datatypes are just guesses (based on the query result you kindly provided). Also, regarding result classes, I only added one for 'cpanstats' table, give it's the only table I know the existance of :)

barbie commented 7 years ago

Sorry for being out of action for some time. The following should also help, if though they haven't all been kept up to date:

https://v1.metacpan.org/source/BARBIE/CPAN-Testers-Data-Generator-1.21/examples/cpanstats.sql https://v1.metacpan.org/source/BARBIE/CPAN-Testers-Data-Addresses-0.17/examples/create-address.sql https://v1.metacpan.org/source/BARBIE/CPAN-Testers-Data-Uploads-0.21/examples/uploads.sql

BTW, cpanstats.type denotes whether the entry is active or to be ignored. It's used by the CPAN Testers Admin site to "delete" reports that authors/testers agree are bogus.

If you have any specific queries about tables or fields, let me know and I'll see how much I can remember!

You're both doing a great job with this, as it's something I would have liked to have done a few years ago.

preaction commented 7 years ago

I've renamed the CpanStats result class to just Stats, I restructured the repository to be a CPAN-style dist (though releasing to CPAN is far off on the horizon), and I've documented the Stats table with everything I could glean from the links (thanks barbie) and the Admin web app.

The next couple places to go are: