Commit 4ee7d136 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Add apt table to hold data about each of the aggregates we use in the

Portal. Yep, about time we get rid of all the hardwired cruft.
parent f9cb198e
......@@ -58,6 +58,22 @@ CREATE TABLE `active_checkups` (
-- Table structure for table `apt_datasets`
--
DROP TABLE IF EXISTS `apt_aggregates`;
CREATE TABLE `apt_aggregates` (
`urn` varchar(128) default NULL,
`name` varchar(32) NOT NULL default '',
`nickname` varchar(32) NOT NULL default '',
`abbreviation` varchar(16) NOT NULL default '',
`updated` datetime NOT NULL default '0000-00-00 00:00:00',
`weburl` tinytext,
`jsondata` text,
PRIMARY KEY (`urn`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `apt_datasets`
--
DROP TABLE IF EXISTS `apt_datasets`;
CREATE TABLE `apt_datasets` (
`idx` int(10) unsigned NOT NULL default '0',
......
#
# APT Stuff.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBTableExists("apt_aggregates")) {
DBQueryFatal("CREATE TABLE `apt_aggregates` ( ".
" `urn` varchar(128) default NULL, ".
" `name` varchar(32) NOT NULL default '', ".
" `nickname` varchar(32) NOT NULL default '', ".
" `abbreviation` varchar(16) NOT NULL default '', ".
" `updated` datetime NOT NULL default '0000-00-00 00:00:00', ".
" `weburl` tinytext, ".
" `jsondata` text, ".
" PRIMARY KEY (`urn`) ".
") ENGINE=MyISAM DEFAULT CHARSET=latin1");
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment