Skip to content
Browse files

added cpanstats DB schema to examples directory

  • Loading branch information...
1 parent 07677d5 commit abab71573bde9ac803c4f236f7e778da9be9bee5 @barbie committed Oct 19, 2009
Showing with 95 additions and 0 deletions.
  1. +1 −0 CHANGES
  2. +1 −0 MANIFEST
  3. +93 −0 examples/cpanstats.sql
View
1 CHANGES
@@ -2,6 +2,7 @@ Revision history for Perl module CPAN::Testers::Data::Generator.
0.38 19/10/2009
- added functionality to update the osname table.
+ - added cpanstats DB schema to examples directory.
0.37 07/06/2009
- added page request functionality.
View
1 MANIFEST
@@ -14,6 +14,7 @@ bin/cpanstats-verify
examples/cpanstats-createdb
examples/cpanstats-convert
examples/cpanstats-verify.sh
+examples/cpanstats.sql
examples/generate.sh
examples/settings-example.ini
lib/CPAN/Testers/Data/Generator.pm
View
93 examples/cpanstats.sql
@@ -0,0 +1,93 @@
+# Complete DB Schema for CPANSTATS Database
+
+DROP TABLE IF EXISTS cpanstats;
+CREATE TABLE cpanstats (
+ id int(10) unsigned NOT NULL,
+ state varchar(32),
+ postdate varchar(8),
+ tester varchar(255),
+ dist varchar(255),
+ version varchar(255),
+ platform varchar(255),
+ perl varchar(255),
+ osname varchar(255),
+ osvers varchar(255),
+ fulldate varchar(32),
+ PRIMARY KEY (id)
+);
+
+DROP TABLE IF EXISTS `release_data`;
+CREATE TABLE `release_data` (
+ `dist` varchar(255) NOT NULL,
+ `version` varchar(255) NOT NULL,
+ `id` int(10) unsigned NOT NULL,
+ `oncpan` tinyint(4) default '0',
+ `distmat` tinyint(4) default '0',
+ `perlmat` tinyint(4) default '0',
+ `patched` tinyint(4) default '0',
+ `pass` int(10) default '0',
+ `fail` int(10) default '0',
+ `na` int(10) default '0',
+ `unknown` int(10) default '0'
+);
+
+DROP TABLE IF EXISTS release_summary;
+CREATE TABLE release_summary (
+ dist varchar(255) NOT NULL,
+ version varchar(255) NOT NULL,
+ id int(10) unsigned NOT NULL,
+ oncpan tinyint(4) default 0,
+ distmat tinyint(4) default 0,
+ perlmat tinyint(4) default 0,
+ patched tinyint(4) default 0,
+ pass int(10) default 0,
+ fail int(10) default 0,
+ na int(10) default 0,
+ unknown int(10) default 0
+);
+
+DROP TABLE IF EXISTS `uploads`;
+CREATE TABLE `uploads` (
+ `type` varchar(10) NOT NULL,
+ `author` varchar(32) NOT NULL,
+ `dist` varchar(255) NOT NULL,
+ `version` varchar(255) NOT NULL,
+ `filename` varchar(255) NOT NULL,
+ `released` int(16) NOT NULL,
+ PRIMARY KEY (`author`,`dist`,`version`)
+) ENGINE=MyISAM;
+
+DROP TABLE IF EXISTS `ixlatest`;
+CREATE TABLE `ixlatest` (
+ `dist` varchar(255) NOT NULL,
+ `version` varchar(255) NOT NULL,
+ `released` int(16) NOT NULL,
+ `author` varchar(32) NOT NULL,
+ `oncpan` tinyint(4) DEFAULT 0,
+ PRIMARY KEY (`dist`)
+) ENGINE=MyISAM;
+
+DROP TABLE IF EXISTS `summary`;
+CREATE TABLE `summary` (
+ `type` varchar(8) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `lastid` int(10) unsigned NOT NULL,
+ `dataset` blob,
+ PRIMARY KEY (`type`,`name`)
+) ENGINE=MyISAM;
+
+DROP TABLE IF EXISTS `page_requests`;
+CREATE TABLE `page_requests` (
+ `type` varchar(8) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `weight` int(2) unsigned NOT NULL
+) ENGINE=MyISAM;
+
+DROP TABLE IF EXISTS osname;
+CREATE TABLE osname (
+ id int(10) unsigned NOT NULL auto_increment,
+ osname varchar(255),
+ ostitle varchar(255),
+ PRIMARY KEY (id)
+);
+

0 comments on commit abab715

Please sign in to comment.
Something went wrong with that request. Please try again.