From 550d2bf72984325071c7fee6618b8234cf7fcc08 Mon Sep 17 00:00:00 2001 From: Oriol Soriano Date: Thu, 18 Aug 2016 01:02:14 +0200 Subject: [PATCH] Adds CpanStats Result class for table 'cpanstats' Important: Most of the data types are merely guessed, based on the gist containing the results of a select query Doug kindly provided me. --- CpanStats/Result/CpanStats.pm | 87 +++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 CpanStats/Result/CpanStats.pm diff --git a/CpanStats/Result/CpanStats.pm b/CpanStats/Result/CpanStats.pm new file mode 100644 index 0000000..3e626b2 --- /dev/null +++ b/CpanStats/Result/CpanStats.pm @@ -0,0 +1,87 @@ +use utf8; +package CpanStats::Result::CpanStats; + +use strict; +use warnings; + +__PACKAGE__->table('cpanstats'); + +__PACKAGE__->add_columns( + 'id', { + data_type => 'int', + extra => { unsigned => 1 }, + is_auto_increment => 1, + is_nullable => 0, + }, + 'guid', { + data_type => 'varchar', + is_nullable => 0, + size => 36, + }, + 'state', { + data_type => 'enum', + extra => { list => ['pass', 'fail', 'unknown', 'na'] }, + is_nullable => 0, + }, + # masked type maybe? or a FK? + 'postdate', { + data_type => 'mediumint', + extra => { unsigned => 1 }, + is_nullable => 0, + }, + 'tester', { + data_type => 'varchar', + is_nullable => 0, + size => 100, + }, + 'dist', { + data_type => 'varchar', + is_nullable => 0, + size => 100, + }, + 'version', { + data_type => 'varchar', + is_nullable => 0, + size => 20, + }, + 'platform', { + data_type => 'varchar', + is_nullable => 0, + size => 20, + }, + 'perl', { + data_type => 'varchar', + is_nullable => 0, + size => 10, + }, + 'osname', { + data_type => 'varchar', + is_nullable => 0, + size => 20, + }, + 'osvers', { + data_type => 'varchar', + is_nullable => 0, + size => 20, + }, + 'fulldate', { + data_type => 'char', + is_nullable => 0, + size => 8, + }, + # FK? + 'type', { + data_type => 'tinyint', + extra => { unsigned => 1 }, + is_nullable => 0, + }, + 'uploadid', { + data_type => 'int', + extra => { unsigned => 1 }, + is_nullable => 0, + }, +); + +__PACKAGE__->set_primary_key('id'); + +1;