Commit 4408843a authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Changes to apt_announcements table:

1. Add a unique uuid for a shared lookup token with the web UI.

2. Add pid_idx for targeting announcements to projects (issue #258).
parent 66781988
......@@ -525,8 +525,10 @@ CREATE TABLE `apt_profiles` (
DROP TABLE IF EXISTS `apt_announcements`;
CREATE TABLE `apt_announcements` (
`idx` int(10) unsigned NOT NULL auto_increment,
`uuid` varchar(40) NOT NULL,
`created` datetime default NULL,
`uid_idx` int(10) default NULL,
`pid_idx` int(10) default NULL,
`genesis` varchar(64) NOT NULL default 'emulab',
`portal` varchar(64) NOT NULL default 'emulab',
`retired` tinyint(1) NOT NULL default '0',
......
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("apt_announcements", "uuid")) {
DBQueryFatal("alter table apt_announcements add ".
" `uuid` varchar(40) NOT NULL after idx");
}
if (!DBSlotExists("apt_announcements", "pid_idx")) {
DBQueryFatal("alter table apt_announcements add ".
" `pid_idx` int(10) default NULL after uid_idx");
}
return 0;
}
# 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