From 0c6abbd11e417195027c681df1df1087d21cc0ec Mon Sep 17 00:00:00 2001 From: Leigh B Stoller Date: Wed, 21 Apr 2010 16:40:14 -0600 Subject: [PATCH] Add a key (urn) to geni_authorities. Add a creator_urn slot to geni_slices. --- protogeni/updates/14 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 protogeni/updates/14 diff --git a/protogeni/updates/14 b/protogeni/updates/14 new file mode 100644 index 000000000..70583316f --- /dev/null +++ b/protogeni/updates/14 @@ -0,0 +1,22 @@ +# +# Add a URN field to the certificate table. +# +use strict; +use GeniDB; + +sub DoUpdate($$$) +{ + my ($dbhandle, $dbname, $version) = @_; + + DBSetDefault($dbhandle); + + DBQueryFatal("ALTER TABLE `geni_authorities` " . + "add unique key `urn` (`urn`(256))"); + + DBQueryFatal("ALTER TABLE `geni_slices` " . + "ADD COLUMN `creator_urn` tinytext after creator_uuid") + unless DBSlotExists("geni_slices", "creator_urn"); + + return 0; +} +1; -- GitLab