protogeni.sql 10.8 KB
Newer Older
Leigh Stoller's avatar
Leigh Stoller committed
1 2 3 4 5 6 7
DROP TABLE IF EXISTS `geni_users`;
CREATE TABLE `geni_users` (
  `hrn` varchar(256) NOT NULL default '',
  `uid` varchar(8) NOT NULL default '',
  `idx` mediumint(8) unsigned NOT NULL default '0',
  `uuid` varchar(40) NOT NULL default '',
  `created` datetime default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
8 9
  `expires` datetime default NULL,
  `locked` datetime default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
10 11 12 13
  `archived` datetime default NULL,
  `status` enum('active','archived','frozen') NOT NULL default 'frozen',
  `name` tinytext,
  `email` tinytext,
14
  `sa_uuid` varchar(40) NOT NULL default '',
Leigh Stoller's avatar
Leigh Stoller committed
15 16 17 18 19 20 21
  PRIMARY KEY  (`idx`),
  KEY `hrn` (`hrn`),
  UNIQUE KEY `uuid` (`uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `geni_components`;
CREATE TABLE `geni_components` (
22
  `hrn` varchar(256) NOT NULL default '',
Leigh Stoller's avatar
Leigh Stoller committed
23
  `uuid` varchar(40) NOT NULL default '',
Leigh Stoller's avatar
Leigh Stoller committed
24
  `manager_uuid` varchar(40) default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
25
  `created` datetime default NULL,
26
  `expires` datetime default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
27
  `url` tinytext,
Leigh Stoller's avatar
Leigh Stoller committed
28 29
  PRIMARY KEY  (`uuid`),
  UNIQUE KEY `hrn` (`hrn`)
Leigh Stoller's avatar
Leigh Stoller committed
30 31
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

32 33
DROP TABLE IF EXISTS `geni_authorities`;
CREATE TABLE `geni_authorities` (
34
  `hrn` varchar(256) NOT NULL default '',
Leigh Stoller's avatar
Leigh Stoller committed
35
  `uuid` varchar(40) NOT NULL default '',
36
  `uuid_prefix` varchar(12) NOT NULL default '',
Leigh Stoller's avatar
Leigh Stoller committed
37
  `created` datetime default NULL,
38
  `expires` datetime default NULL,
39
  `type` enum('sa','ma','ch','cm','ses') NOT NULL default 'sa',
40
  `disabled` tinyint(1) NOT NULL default '0',
Leigh Stoller's avatar
Leigh Stoller committed
41
  `url` tinytext,
Gary Wong's avatar
Gary Wong committed
42
  `urn` tinytext,
Leigh Stoller's avatar
Leigh Stoller committed
43 44
  PRIMARY KEY  (`uuid`),
  UNIQUE KEY `hrn` (`hrn`)
Leigh Stoller's avatar
Leigh Stoller committed
45 46 47 48 49 50 51
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `geni_slices`;
CREATE TABLE `geni_slices` (
  `hrn` varchar(256) NOT NULL default '',
  `idx` mediumint(8) unsigned NOT NULL default '0',
  `uuid` varchar(40) NOT NULL default '',
52
  `exptidx` int(11) default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
53
  `created` datetime default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
54
  `expires` datetime default NULL,
55
  `shutdown` datetime default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
56
  `locked` datetime default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
57 58
  `creator_uuid` varchar(40) NOT NULL default '',
  `name` tinytext,
59
  `sa_uuid` varchar(40) NOT NULL default '',
60
  `needsfirewall` tinyint(1) NOT NULL default '0',
Leigh Stoller's avatar
Leigh Stoller committed
61 62 63 64 65 66 67 68 69
  PRIMARY KEY  (`idx`),
  UNIQUE KEY `hrn` (`hrn`),
  UNIQUE KEY `uuid` (`uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `geni_slivers`;
CREATE TABLE `geni_slivers` (
  `idx` mediumint(8) unsigned NOT NULL default '0',
  `uuid` varchar(40) NOT NULL default '',
70
  `hrn` varchar(256) NOT NULL default '',
71
  `nickname` varchar(256) default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
72 73
  `slice_uuid` varchar(40) NOT NULL default '',
  `creator_uuid` varchar(40) NOT NULL default '',
Leigh Stoller's avatar
Leigh Stoller committed
74
  `resource_uuid` varchar(40) NOT NULL default '',
75
  `resource_type` varchar(40) NOT NULL default '',
76
  `resource_id` varchar(64) NOT NULL default '',
Leigh Stoller's avatar
Leigh Stoller committed
77
  `created` datetime default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
78 79
  `expires` datetime default NULL,
  `locked` datetime default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
80
  `credential_idx` int(10) unsigned default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
81 82
  `component_uuid` varchar(40) default NULL,
  `aggregate_uuid` varchar(40) default NULL,
83 84
  `status` varchar(16) NOT NULL default 'created',
  `state` varchar(16) NOT NULL default 'stopped',
Leigh Stoller's avatar
Leigh Stoller committed
85
  `rspec_string` text,
Leigh Stoller's avatar
Leigh Stoller committed
86 87 88 89 90 91 92 93
  PRIMARY KEY  (`idx`),
  UNIQUE KEY `uuid` (`uuid`),
  INDEX `slice_uuid` (`slice_uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `geni_aggregates`;
CREATE TABLE `geni_aggregates` (
  `idx` mediumint(8) unsigned NOT NULL default '0',
94
  `hrn` varchar(256) NOT NULL default '',
95
  `nickname` varchar(256) default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
96
  `uuid` varchar(40) NOT NULL default '',
97
  `type` varchar(40) NOT NULL default '',
Leigh Stoller's avatar
Leigh Stoller committed
98 99
  `slice_uuid` varchar(40) NOT NULL default '',
  `creator_uuid` varchar(40) NOT NULL default '',
Leigh Stoller's avatar
Leigh Stoller committed
100
  `created` datetime default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
101 102
  `expires` datetime default NULL,
  `locked` datetime default NULL,
103
  `registered` datetime default NULL,
104 105
  `credential_idx` int(10) unsigned default NULL,
  `component_idx` int(10) unsigned NOT NULL default '0',
106
  `aggregate_idx` int(10) unsigned default NULL,
107 108
  `status` varchar(16) NOT NULL default 'created',
  `state` varchar(16) NOT NULL default 'stopped',
Leigh Stoller's avatar
Leigh Stoller committed
109 110 111 112 113
  PRIMARY KEY  (`idx`),
  UNIQUE KEY `uuid` (`uuid`),
  INDEX `slice_uuid` (`slice_uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Leigh Stoller's avatar
Leigh Stoller committed
114 115 116
DROP TABLE IF EXISTS `geni_tickets`;
CREATE TABLE `geni_tickets` (
  `idx` mediumint(8) unsigned NOT NULL default '0',
117
  `ticket_uuid` varchar(40) NOT NULL default '',
Leigh Stoller's avatar
Leigh Stoller committed
118 119
  `owner_uuid` varchar(40) NOT NULL default '',
  `slice_uuid` varchar(40) NOT NULL default '',
120
  `target_uuid` varchar(40) NOT NULL default '',
Leigh Stoller's avatar
Leigh Stoller committed
121 122
  `created` datetime default NULL,
  `redeem_before` datetime default NULL,
123
  `redeemed` datetime default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
124
  `locked` datetime default NULL,
Leigh Stoller's avatar
Leigh Stoller committed
125
  `valid_until` datetime default NULL,
126
  `component_uuid` varchar(40) NOT NULL default '',
127
  `seqno` int(10) unsigned NOT NULL default '0',
Leigh Stoller's avatar
Leigh Stoller committed
128
  `ticket_string` text,
129
  PRIMARY KEY  (`idx`), 
Leigh Stoller's avatar
Leigh Stoller committed
130
  INDEX `owner_uuid` (`owner_uuid`),
131
  INDEX `slice_uuid` (`slice_uuid`),
132
  UNIQUE KEY `compseqno` (`component_uuid`, `seqno`)
Leigh Stoller's avatar
Leigh Stoller committed
133
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
134 135 136 137

DROP TABLE IF EXISTS `geni_credentials`;
CREATE TABLE `geni_credentials` (
  `idx` mediumint(8) unsigned NOT NULL default '0',
138
  `uuid` varchar(40) NOT NULL default '',
139 140 141 142 143 144 145 146 147 148 149
  `owner_uuid` varchar(40) NOT NULL default '',
  `this_uuid` varchar(40) NOT NULL default '',
  `created` datetime default NULL,
  `valid_until` datetime default NULL,
  `credential_string` text,
  PRIMARY KEY  (`idx`),
  INDEX `owner_uuid` (`owner_uuid`),
  INDEX `this_uuid` (`this_uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `geni_certificates`;
Leigh Stoller's avatar
Leigh Stoller committed
150 151 152 153 154 155 156 157 158
CREATE TABLE `geni_certificates` (
  `uuid` varchar(40) NOT NULL default '',
  `created` datetime default NULL,
  `expires` datetime default NULL,
  `revoked` datetime default NULL,
  `serial` int(10) unsigned NOT NULL default '0',
  `cert` text,
  `DN` text,
  `privkey` text,
159
  `uri` text,
Gary Wong's avatar
Gary Wong committed
160
  `urn` text,
Leigh Stoller's avatar
Leigh Stoller committed
161 162 163 164 165 166 167 168 169
  PRIMARY KEY  (`uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `geni_crls`;
CREATE TABLE `geni_crls` (
  `uuid` varchar(40) NOT NULL default '',
  `created` datetime default NULL,
  `expires` datetime default NULL,
  `cert` text,
170
  `DN` text,
Leigh Stoller's avatar
Leigh Stoller committed
171 172 173
  PRIMARY KEY  (`uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

174 175 176 177 178 179 180 181 182
CREATE TABLE `geni_manifests` (
  `idx` int(10) unsigned NOT NULL auto_increment,
  `slice_uuid` varchar(40) NOT NULL default '',
  `created` datetime default NULL,
  `manifest` text,
  PRIMARY KEY  (`idx`),
  UNIQUE KEY `slice_uuid` (`slice_uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

183 184 185
DROP TABLE IF EXISTS `geni_userkeys`;
CREATE TABLE `geni_userkeys` (
  `type` enum('ssh','password') NOT NULL default 'ssh',
Leigh Stoller's avatar
Leigh Stoller committed
186 187
  `uuid` varchar(40) NOT NULL default '',
  `created` datetime default NULL,
188 189
  `key` text,
  INDEX `uuid` (`uuid`)
Leigh Stoller's avatar
Leigh Stoller committed
190
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
191 192 193

DROP TABLE IF EXISTS `geni_resources`;
CREATE TABLE `geni_resources` (
194 195 196 197 198
  `pid` varchar(12) NOT NULL default '',
  `eid` varchar(32) NOT NULL default '',
  `exptidx` int(11) NOT NULL default '0',
  `idx` mediumint(8) unsigned NOT NULL default '0',
  `manager_urn` tinytext,
199
  `created` datetime default NULL,
200
  `expires` datetime default NULL,
201 202 203 204 205 206 207 208
  `updated` datetime default NULL,
  `slice_idx` mediumint(8) unsigned NOT NULL default '0',
  `credential_idx` mediumint(8) unsigned NOT NULL default '0',
  `manifest_idx` mediumint(8) unsigned NOT NULL default '0',
  `ticket_idx` mediumint(8) unsigned NOT NULL default '0',
  `newticket_idx` mediumint(8) unsigned NOT NULL default '0',
  PRIMARY KEY  (`idx`),
  UNIQUE KEY `manager` (`exptidx`,`manager_urn`(255))
209 210 211 212 213 214 215 216 217 218
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `geni_bindings`;
CREATE TABLE `geni_bindings` (
  `slice_uuid` varchar(40) NOT NULL default '',
  `user_uuid` varchar(40) NOT NULL default '',
  `created` datetime default NULL,
  PRIMARY KEY  (`slice_uuid`,`user_uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

219 220 221 222 223 224 225
DROP TABLE IF EXISTS `version_info`;
CREATE TABLE `version_info` (
  `name` varchar(32) NOT NULL default '',
  `value` tinytext NOT NULL,
  PRIMARY KEY  (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
REPLACE INTO `version_info` VALUES ('dbrev', '0');
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244

DROP TABLE IF EXISTS `sliver_history`;
CREATE TABLE `sliver_history` (
  `idx` mediumint(8) unsigned NOT NULL default '0',
  `uuid` varchar(40) NOT NULL default '',
  `hrn` varchar(256) NOT NULL default '',
  `slice_uuid` varchar(40) NOT NULL default '',
  `slice_hrn` varchar(256) NOT NULL default '',
  `creator_uuid` varchar(40) NOT NULL default '',
  `creator_hrn` varchar(256) NOT NULL default '',
  `resource_uuid` varchar(40) NOT NULL default '',
  `resource_type` varchar(40) NOT NULL default '',
  `created` datetime default NULL,
  `destroyed` datetime default NULL,
  `component_uuid` varchar(40) default NULL,
  `component_hrn` varchar(256) default NULL,
  `aggregate_uuid` varchar(40) default NULL,
  `rspec_string` text,
  PRIMARY KEY  (`idx`),
245
  KEY `uuid` (`uuid`),
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
  INDEX `slice_uuid` (`slice_uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

DROP TABLE IF EXISTS `aggregate_history`;
CREATE TABLE `aggregate_history` (
  `idx` mediumint(8) unsigned NOT NULL default '0',
  `uuid` varchar(40) NOT NULL default '',
  `hrn` varchar(256) NOT NULL default '',
  `type` varchar(40) NOT NULL default '',
  `slice_uuid` varchar(40) NOT NULL default '',
  `slice_hrn` varchar(256) NOT NULL default '',
  `creator_uuid` varchar(40) NOT NULL default '',
  `creator_hrn` varchar(256) NOT NULL default '',
  `created` datetime default NULL,
  `destroyed` datetime default NULL,
  PRIMARY KEY  (`idx`),
  UNIQUE KEY `uuid` (`uuid`),
  INDEX `slice_uuid` (`slice_uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

266 267 268 269 270 271 272 273
CREATE TABLE `manifest_history` (
  `idx` int(10) unsigned NOT NULL auto_increment,
  `aggregate_uuid` varchar(40) NOT NULL default '',
  `created` datetime default NULL,
  `manifest` text,
  PRIMARY KEY  (`idx`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293
DROP TABLE IF EXISTS `ticket_history`;
CREATE TABLE `ticket_history` (
  `idx` mediumint(8) unsigned NOT NULL default '0',
  `uuid` varchar(40) NOT NULL default '',
  `owner_uuid` varchar(40) NOT NULL default '',
  `owner_hrn` varchar(256) NOT NULL default '',
  `slice_uuid` varchar(40) NOT NULL default '',
  `slice_hrn` varchar(256) NOT NULL default '',
  `created` datetime default NULL,
  `redeemed` datetime default NULL,
  `expired` datetime default NULL,
  `released` datetime default NULL,
  `component_uuid` varchar(40) NOT NULL default '',
  `component_hrn` varchar(256) default NULL,
  `rspec_string` text,
  PRIMARY KEY  (`idx`),
  UNIQUE KEY `uuid` (`uuid`),
  INDEX `slice_uuid` (`slice_uuid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
DROP TABLE IF EXISTS `client_slivers`;
CREATE TABLE `client_slivers` (
  `idx` mediumint(8) unsigned NOT NULL default '0',
  `urn` varchar(256) NOT NULL default '',
  `slice_idx` mediumint(8) unsigned NOT NULL default '0',
  `manager_urn` varchar(256) NOT NULL default '',
  `creator_idx` mediumint(8) unsigned NOT NULL default '0',
  `created` datetime default NULL,
  `expires` datetime default NULL,
  `locked` datetime default NULL,
  `manifest` text,
  PRIMARY KEY  (`idx`),
  INDEX `slice_uuid` (`slice_idx`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;