2 -- PlanetLab Central database schema
3 -- Version 4, PostgreSQL
5 -- Aaron Klingaman <alk@cs.princeton.edu>
6 -- Reid Moran <rmoran@cs.princeton.edu>
7 -- Mark Huang <mlhuang@cs.princeton.edu>
8 -- Tony Mack <tmack@cs.princeton.edu>
10 -- Copyright (C) 2006 The Trustees of Princeton University
12 -- $Id: planetlab4.sql,v 1.15 2006/10/18 20:54:28 tmack Exp $
15 --------------------------------------------------------------------------------
16 -- Aggregates and store procedures
17 --------------------------------------------------------------------------------
19 -- Like MySQL GROUP_CONCAT(), this function aggregates values into a
21 CREATE AGGREGATE array_accum (
23 basetype = anyelement,
28 --------------------------------------------------------------------------------
30 --------------------------------------------------------------------------------
33 CREATE TABLE persons (
35 person_id serial PRIMARY KEY, -- Account identifier
36 email text NOT NULL, -- E-mail address
37 first_name text NOT NULL, -- First name
38 last_name text NOT NULL, -- Last name
39 deleted boolean NOT NULL DEFAULT false, -- Has been deleted
40 enabled boolean NOT NULL DEFAULT false, -- Has been disabled
43 password text NOT NULL, -- Password (md5crypted)
44 verification_key text, -- Reset password key
45 verification_expires timestamp without time zone,
48 title text, -- Honorific
49 phone text, -- Telephone number
50 url text, -- Home page
51 bio text, -- Biography
54 date_created timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
55 last_updated timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP
57 CREATE INDEX persons_email_idx ON persons (email) WHERE deleted IS false;
59 --------------------------------------------------------------------------------
61 --------------------------------------------------------------------------------
66 site_id serial PRIMARY KEY, -- Site identifier
67 login_base text NOT NULL, -- Site slice prefix
68 name text NOT NULL, -- Site name
69 abbreviated_name text NOT NULL, -- Site abbreviated name
70 deleted boolean NOT NULL DEFAULT false, -- Has been deleted
71 is_public boolean NOT NULL DEFAULT true, -- Shows up in public lists
72 max_slices integer NOT NULL DEFAULT 0, -- Maximum number of slices
73 max_slivers integer NOT NULL DEFAULT 1000, -- Maximum number of instantiated slivers
81 date_created timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
82 last_updated timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP
84 CREATE INDEX sites_login_base_idx ON sites (login_base) WHERE deleted IS false;
86 -- Account site membership
87 CREATE TABLE person_site (
88 person_id integer REFERENCES persons NOT NULL, -- Account identifier
89 site_id integer REFERENCES sites NOT NULL, -- Site identifier
90 is_primary boolean NOT NULL DEFAULT false, -- Is the primary site for this account
91 PRIMARY KEY (person_id, site_id)
93 CREATE INDEX person_site_person_id_idx ON person_site (person_id);
94 CREATE INDEX person_site_site_id_idx ON person_site (site_id);
96 -- Ordered by primary site first
97 CREATE VIEW person_site_ordered AS
98 SELECT person_id, site_id
100 ORDER BY is_primary DESC;
102 -- Sites that each person is a member of
103 CREATE VIEW person_sites AS
105 array_to_string(array_accum(site_id), ',') AS site_ids
106 FROM person_site_ordered
109 -- Accounts at each site
110 CREATE VIEW site_persons AS
112 array_to_string(array_accum(person_id), ',') AS person_ids
116 --------------------------------------------------------------------------------
118 --------------------------------------------------------------------------------
120 CREATE TABLE address_types (
121 address_type_id serial PRIMARY KEY, -- Address type identifier
122 name text UNIQUE NOT NULL, -- Address type
123 description text -- Address type description
126 INSERT INTO address_types (name) VALUES ('Personal');
127 INSERT INTO address_types (name) VALUES ('Shipping');
128 -- XXX Used to be Site
129 INSERT INTO address_types (name) VALUES ('Billing');
132 CREATE TABLE addresses (
133 address_id serial PRIMARY KEY, -- Address identifier
134 site_id integer REFERENCES sites NOT NULL, -- Site identifier
135 line1 text NOT NULL, -- Address line 1
136 line2 text, -- Address line 2
137 line3 text, -- Address line 3
138 city text NOT NULL, -- City
139 state text NOT NULL, -- State or province
140 postalcode text NOT NULL, -- Postal code
141 country text NOT NULL -- Country
144 -- Each mailing address can be one of several types
145 CREATE TABLE address_address_type (
146 address_id integer REFERENCES addresses NOT NULL, -- Address identifier
147 address_type_id integer REFERENCES address_types NOT NULL -- Address type
150 CREATE VIEW address_address_types AS
152 array_to_string(array_accum(address_type_id), ',') AS address_type_ids,
153 array_to_string(array_accum(address_types.name), ',') AS address_types
154 FROM address_address_type
155 LEFT JOIN address_types USING (address_type_id)
158 CREATE VIEW site_addresses AS
160 array_to_string(array_accum(address_id), ',') AS address_ids
164 --------------------------------------------------------------------------------
165 -- Authentication Keys
166 --------------------------------------------------------------------------------
169 CREATE TABLE key_types (
170 key_type text PRIMARY KEY -- Key type
172 INSERT INTO key_types (key_type) VALUES ('ssh');
174 -- Authentication keys
176 key_id serial PRIMARY KEY, -- Key identifier
177 key_type text REFERENCES key_types NOT NULL, -- Key type
178 key text NOT NULL, -- Key material
179 is_blacklisted boolean NOT NULL DEFAULT false -- Has been blacklisted
182 -- Account authentication key(s)
183 CREATE TABLE person_key (
184 person_id integer REFERENCES persons NOT NULL, -- Account identifier
185 key_id integer REFERENCES keys NOT NULL, -- Key identifier
186 PRIMARY KEY (person_id, key_id)
188 CREATE INDEX person_key_person_id_idx ON person_key (person_id);
189 CREATE INDEX person_key_key_id_idx ON person_key (key_id);
191 CREATE VIEW person_keys AS
193 array_to_string(array_accum(key_id), ',') AS key_ids
197 --------------------------------------------------------------------------------
199 --------------------------------------------------------------------------------
201 -- Valid account roles
203 role_id integer PRIMARY KEY, -- Role identifier
204 name text UNIQUE NOT NULL -- Role symbolic name
206 INSERT INTO roles (role_id, name) VALUES (10, 'admin');
207 INSERT INTO roles (role_id, name) VALUES (20, 'pi');
208 INSERT INTO roles (role_id, name) VALUES (30, 'user');
209 INSERT INTO roles (role_id, name) VALUES (40, 'tech');
210 INSERT INTO roles (role_id, name) VALUES (1000, 'node');
211 INSERT INTO roles (role_id, name) VALUES (2000, 'anonymous');
213 CREATE TABLE person_role (
214 person_id integer REFERENCES persons NOT NULL, -- Account identifier
215 role_id integer REFERENCES roles NOT NULL, -- Role identifier
216 PRIMARY KEY (person_id, role_id)
218 CREATE INDEX person_role_person_id_idx ON person_role (person_id);
221 CREATE VIEW person_roles AS
223 array_to_string(array_accum(role_id), ',') AS role_ids,
224 array_to_string(array_accum(roles.name), ',') AS roles
226 LEFT JOIN roles USING (role_id)
229 --------------------------------------------------------------------------------
231 --------------------------------------------------------------------------------
233 -- Valid node boot states
234 CREATE TABLE boot_states (
235 boot_state text PRIMARY KEY
237 INSERT INTO boot_states (boot_state) VALUES ('boot');
238 INSERT INTO boot_states (boot_state) VALUES ('dbg');
239 INSERT INTO boot_states (boot_state) VALUES ('inst');
240 INSERT INTO boot_states (boot_state) VALUES ('rins');
241 INSERT INTO boot_states (boot_state) VALUES ('rcnf');
242 INSERT INTO boot_states (boot_state) VALUES ('new');
247 node_id serial PRIMARY KEY, -- Node identifier
248 hostname text NOT NULL, -- Node hostname
249 site_id integer REFERENCES sites NOT NULL, -- At which site
250 boot_state text REFERENCES boot_states NOT NULL DEFAULT 'inst', -- Node boot state
251 deleted boolean NOT NULL DEFAULT false, -- Is deleted
254 model text, -- Hardware make and model
255 boot_nonce text, -- Random nonce updated by Boot Manager
256 version text, -- Boot CD version string updated by Boot Manager
257 -- XXX Should be key_id integer REFERENCES keys
258 ssh_rsa_key text, -- SSH host key updated by Boot Manager
259 key text, -- Node key generated by API when configuration file is downloaded
260 session text, -- Session key generated by PLC when Boot Manager authenticates
263 date_created timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP,
264 last_updated timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP
266 CREATE INDEX nodes_hostname_idx ON nodes (hostname) WHERE deleted IS false;
267 CREATE INDEX nodes_site_id_idx ON nodes (site_id) WHERE deleted IS false;
269 -- Nodes at each site
270 CREATE VIEW site_nodes AS
272 array_to_string(array_accum(node_id), ',') AS node_ids
276 --------------------------------------------------------------------------------
278 --------------------------------------------------------------------------------
281 CREATE TABLE nodegroups (
282 nodegroup_id serial PRIMARY KEY, -- Group identifier
283 name text UNIQUE NOT NULL, -- Group name
284 description text -- Group description
287 -- Node group membership
288 CREATE TABLE nodegroup_node (
289 nodegroup_id integer REFERENCES nodegroups NOT NULL, -- Group identifier
290 node_id integer REFERENCES nodes NOT NULL, -- Node identifier
291 PRIMARY KEY (nodegroup_id, node_id)
293 CREATE INDEX nodegroup_node_nodegroup_id_idx ON nodegroup_node (nodegroup_id);
294 CREATE INDEX nodegroup_node_node_id_idx ON nodegroup_node (node_id);
296 -- Nodes in each node gruop
297 CREATE VIEW nodegroup_nodes AS
299 array_to_string(array_accum(node_id), ',') AS node_ids
301 GROUP BY nodegroup_id;
303 -- Node groups that each node is a member of
304 CREATE VIEW node_nodegroups AS
306 array_to_string(array_accum(nodegroup_id), ',') AS nodegroup_ids
310 --------------------------------------------------------------------------------
311 -- Node network interfaces
312 --------------------------------------------------------------------------------
314 -- Valid network addressing schemes
315 CREATE TABLE network_types (
316 type text PRIMARY KEY -- Addressing scheme
318 INSERT INTO network_types (type) VALUES ('ipv4');
319 INSERT INTO network_types (type) VALUES ('ipv6');
321 -- Valid network configuration methods
322 CREATE TABLE network_methods (
323 method text PRIMARY KEY -- Configuration method
325 INSERT INTO network_methods (method) VALUES ('static');
326 INSERT INTO network_methods (method) VALUES ('dhcp');
327 INSERT INTO network_methods (method) VALUES ('proxy');
328 INSERT INTO network_methods (method) VALUES ('tap');
329 INSERT INTO network_methods (method) VALUES ('ipmi');
330 INSERT INTO network_methods (method) VALUES ('unknown');
332 -- Node network interfaces
333 CREATE TABLE nodenetworks (
335 nodenetwork_id serial PRIMARY KEY, -- Network interface identifier
336 node_id integer REFERENCES nodes NOT NULL, -- Which node
337 is_primary boolean NOT NULL DEFAULT false, -- Is the primary interface for this node
338 type text REFERENCES network_types NOT NULL, -- Addressing scheme
339 method text REFERENCES network_methods NOT NULL, -- Configuration method
341 -- Optional, depending on type and method
342 ip text, -- IP address
343 mac text, -- MAC address
344 gateway text, -- Default gateway address
345 network text, -- Network address
346 broadcast text, -- Network broadcast address
347 netmask text, -- Network mask
348 dns1 text, -- Primary DNS server
349 dns2 text, -- Secondary DNS server
350 bwlimit integer, -- Bandwidth limit in bps
351 hostname text -- Hostname of this interface
353 CREATE INDEX nodenetworks_node_id_idx ON nodenetworks (node_id);
355 -- Ordered by primary interface first
356 CREATE VIEW nodenetworks_ordered AS
357 SELECT node_id, nodenetwork_id
359 ORDER BY is_primary DESC;
361 -- Network interfaces on each node
362 CREATE VIEW node_nodenetworks AS
364 array_to_string(array_accum(nodenetwork_id), ',') AS nodenetwork_ids
365 FROM nodenetworks_ordered
368 --------------------------------------------------------------------------------
369 -- Power control units (PCUs)
370 --------------------------------------------------------------------------------
374 pcu_id serial PRIMARY KEY, -- PCU identifier
375 site_id integer REFERENCES sites NOT NULL, -- Site identifier
376 hostname text, -- Hostname, not necessarily unique (multiple logical sites could use the same PCU)
377 ip text NOT NULL, -- IP, not necessarily unique
380 protocol text, -- Protocol, e.g. ssh or https or telnet
381 username text, -- Username, if applicable
382 "password" text, -- Password, if applicable
383 model text, -- Model, e.g. BayTech or iPal
384 notes text -- Random notes
386 CREATE INDEX pcus_site_id_idx ON pcus (site_id);
388 CREATE VIEW site_pcus AS
390 array_to_string(array_accum(pcu_id), ',') AS pcu_ids
394 CREATE TABLE pcu_node (
395 pcu_id integer REFERENCES pcus NOT NULL, -- PCU identifier
396 node_id integer REFERENCES nodes NOT NULL, -- Node identifier
397 port integer NOT NULL, -- Port number
398 PRIMARY KEY (pcu_id, node_id), -- The same node cannot be controlled by different ports
399 UNIQUE (pcu_id, port) -- The same port cannot control multiple nodes
401 CREATE INDEX pcu_node_pcu_id_idx ON pcu_node (pcu_id);
402 CREATE INDEX pcu_node_node_id_idx ON pcu_node (node_id);
404 CREATE VIEW node_pcus AS
406 array_to_string(array_accum(pcu_id), ',') AS pcu_ids,
407 array_to_string(array_accum(port), ',') AS ports
411 CREATE VIEW pcu_nodes AS
413 array_to_string(array_accum(node_id), ',') AS node_ids,
414 array_to_string(array_accum(port), ',') AS ports
418 --------------------------------------------------------------------------------
420 --------------------------------------------------------------------------------
422 CREATE TABLE slice_instantiations (
423 instantiation text PRIMARY KEY
425 INSERT INTO slice_instantiations (instantiation) VALUES ('not-instantiated'); -- Placeholder slice
426 INSERT INTO slice_instantiations (instantiation) VALUES ('plc-instantiated'); -- Instantiated by Node Manager
427 INSERT INTO slice_instantiations (instantiation) VALUES ('delegated'); -- Manually instantiated
430 CREATE TABLE slices (
431 slice_id serial PRIMARY KEY, -- Slice identifier
432 site_id integer REFERENCES sites NOT NULL, -- Site identifier
433 name text NOT NULL, -- Slice name
434 instantiation text REFERENCES slice_instantiations NOT NULL DEFAULT 'plc-instantiated', -- Slice state, e.g. plc-instantiated
435 url text, -- Project URL
436 description text, -- Project description
438 max_nodes integer NOT NULL DEFAULT 100, -- Maximum number of nodes that can be assigned to this slice
440 creator_person_id integer REFERENCES persons NOT NULL, -- Creator
441 created timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, -- Creation date
442 expires timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP + '2 weeks', -- Expiration date
444 is_deleted boolean NOT NULL DEFAULT false
446 CREATE INDEX slices_site_id_idx ON slices (site_id) WHERE is_deleted IS false;
447 CREATE INDEX slices_name_idx ON slices (name) WHERE is_deleted IS false;
450 CREATE TABLE slice_node (
451 slice_id integer REFERENCES slices NOT NULL, -- Slice identifier
452 node_id integer REFERENCES nodes NOT NULL -- Node identifier
454 CREATE INDEX slice_node_slice_id_idx ON slice_node (slice_id);
455 CREATE INDEX slice_node_node_id_idx ON slice_node (node_id);
457 -- Synonym for slice_node
458 CREATE VIEW slivers AS
459 SELECT * FROM slice_node;
461 -- Nodes in each slice
462 CREATE VIEW slice_nodes AS
464 array_to_string(array_accum(node_id), ',') AS node_ids
468 -- Slices on each node
469 CREATE VIEW node_slices AS
471 array_to_string(array_accum(slice_id), ',') AS slice_ids
475 -- Slices at each site
476 CREATE VIEW site_slices AS
478 array_to_string(array_accum(slice_id), ',') AS slice_ids
483 CREATE TABLE slice_person (
484 slice_id integer REFERENCES slices NOT NULL, -- Slice identifier
485 person_id integer REFERENCES persons NOT NULL, -- Account identifier
486 PRIMARY KEY (slice_id, person_id)
488 CREATE INDEX slice_person_slice_id_idx ON slice_person (slice_id);
489 CREATE INDEX slice_person_person_id_idx ON slice_person (person_id);
491 -- Members of the slice
492 CREATE VIEW slice_persons AS
494 array_to_string(array_accum(person_id), ',') AS person_ids
498 -- Slices of which each person is a member
499 CREATE VIEW person_slices AS
501 array_to_string(array_accum(slice_id), ',') AS slice_ids
505 --------------------------------------------------------------------------------
507 --------------------------------------------------------------------------------
509 -- Slice attribute types
510 CREATE TABLE slice_attribute_types (
511 attribute_type_id serial PRIMARY KEY, -- Attribute type identifier
512 name text UNIQUE NOT NULL, -- Attribute name
513 description text, -- Attribute description
514 min_role_id integer REFERENCES roles DEFAULT 10 -- If set, minimum (least powerful) role that can set or change this attribute
517 -- Slice/sliver attributes
518 CREATE TABLE slice_attribute (
519 slice_attribute_id serial PRIMARY KEY, -- Slice attribute identifier
520 slice_id integer REFERENCES slices NOT NULL, -- Slice identifier
521 node_id integer REFERENCES nodes, -- Sliver attribute if set
522 attribute_type_id integer REFERENCES slice_attribute_types NOT NULL, -- Attribute type identifier
525 CREATE INDEX slice_attribute_slice_id_idx ON slice_attribute (slice_id);
526 CREATE INDEX slice_attribute_node_id_idx ON slice_attribute (node_id);
528 CREATE VIEW slice_attributes AS
530 array_to_string(array_accum(slice_attribute_id), ',') AS slice_attribute_ids
534 --------------------------------------------------------------------------------
536 --------------------------------------------------------------------------------
539 CREATE TABLE event_types (
540 event_type text PRIMARY KEY -- Event type
544 INSERT INTO event_types (event_type) VALUES ('Add');
545 INSERT INTO event_types (event_type) VALUES ('Get');
546 INSERT INTO event_types (event_type) VALUES ('Update');
547 INSERT INTO event_types (event_type) VALUES ('Delete');
548 INSERT INTO event_types (event_type) VALUES ('Unknown');
551 CREATE TABLE object_types (
552 object_type text PRIMARY KEY -- Object type
556 INSERT INTO object_types (object_type) VALUES ('Person');
557 INSERT INTO object_types (object_type) VALUES ('Site');
558 INSERT INTO object_types (object_type) VALUES ('Node');
559 INSERT INTO object_types (object_type) VALUES ('Slice');
560 INSERT INTO object_types (object_type) VALUES ('Address');
561 INSERT INTO object_types (object_type) VALUES ('AddressType');
562 INSERT INTO object_types (object_type) VALUES ('Attribute');
563 INSERT INTO object_types (object_type) VALUES ('Key');
564 INSERT INTO object_types (object_type) VALUES ('KeyType');
565 INSERT INTO object_types (object_type) VALUES ('Nodegroup');
566 INSERT INTO object_types (object_type) VALUES ('Unknown');
570 CREATE TABLE events (
571 event_id serial PRIMARY KEY, -- Event identifier
572 person_id integer REFERENCES persons, -- person responsible for event
573 event_type text REFERENCES event_types NOT NULL DEFAULT 'Unknown', -- Event type
574 object_type text REFERENCES object_types NOT NULL DEFAULT 'Unknown', -- Object type associated with event
575 fault_code integer NOT NULL DEFAULT 0, -- did this event result in error
576 call text NOT NULL, -- call responsible for this event
577 runtime float, -- Event run time
580 time timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP
585 CREATE TABLE event_object (
586 event_id integer REFERENCES events NOT NULL, -- Event identifier
587 object_id integer NOT NULL -- Object identifier
591 CREATE INDEX event_object_event_id_idx ON event_object (event_id);
592 CREATE INDEX event_object_object_id_idx ON event_object (object_id);
594 CREATE VIEW event_objects AS
596 array_to_string(array_accum(object_id), ',') AS object_ids
599 --------------------------------------------------------------------------------
601 --------------------------------------------------------------------------------
604 CREATE VIEW view_events AS
608 event_objects.object_ids,
615 LEFT JOIN event_objects USING (event_id);
618 CREATE VIEW view_persons AS
627 persons.verification_key,
628 persons.verification_expires,
633 CAST(date_part('epoch', persons.date_created) AS bigint) AS date_created,
634 CAST(date_part('epoch', persons.last_updated) AS bigint) AS last_updated,
635 person_roles.role_ids, person_roles.roles,
636 person_sites.site_ids,
638 person_slices.slice_ids
640 LEFT JOIN person_roles USING (person_id)
641 LEFT JOIN person_sites USING (person_id)
642 LEFT JOIN person_keys USING (person_id)
643 LEFT JOIN person_slices USING (person_id);
645 CREATE VIEW view_nodes AS
658 CAST(date_part('epoch', nodes.date_created) AS bigint) AS date_created,
659 CAST(date_part('epoch', nodes.last_updated) AS bigint) AS last_updated,
660 node_nodenetworks.nodenetwork_ids,
661 node_nodegroups.nodegroup_ids,
662 node_slices.slice_ids,
666 LEFT JOIN node_nodenetworks USING (node_id)
667 LEFT JOIN node_nodegroups USING (node_id)
668 LEFT JOIN node_slices USING (node_id)
669 LEFT JOIN node_pcus USING (node_id);
671 CREATE VIEW view_nodegroups AS
673 nodegroups.nodegroup_id,
675 nodegroups.description,
676 nodegroup_nodes.node_ids
678 LEFT JOIN nodegroup_nodes USING (nodegroup_id);
680 CREATE VIEW view_pcus AS
694 LEFT JOIN pcu_nodes USING (pcu_id);
696 CREATE VIEW view_sites AS
701 sites.abbreviated_name,
709 CAST(date_part('epoch', sites.date_created) AS bigint) AS date_created,
710 CAST(date_part('epoch', sites.last_updated) AS bigint) AS last_updated,
711 site_persons.person_ids,
713 site_addresses.address_ids,
714 site_slices.slice_ids,
717 LEFT JOIN site_persons USING (site_id)
718 LEFT JOIN site_nodes USING (site_id)
719 LEFT JOIN site_addresses USING (site_id)
720 LEFT JOIN site_slices USING (site_id)
721 LEFT JOIN site_pcus USING (site_id);
723 CREATE VIEW view_addresses AS
725 addresses.address_id,
732 addresses.postalcode,
734 address_address_types.address_type_ids,
735 address_address_types.address_types
737 LEFT JOIN address_address_types USING (address_id);
739 CREATE VIEW view_slices AS
744 slices.instantiation,
748 slices.creator_person_id,
750 CAST(date_part('epoch', slices.created) AS bigint) AS created,
751 CAST(date_part('epoch', slices.expires) AS bigint) AS expires,
752 slice_nodes.node_ids,
753 slice_persons.person_ids,
754 slice_attributes.slice_attribute_ids
756 LEFT JOIN slice_nodes USING (slice_id)
757 LEFT JOIN slice_persons USING (slice_id)
758 LEFT JOIN slice_attributes USING (slice_id);
760 CREATE VIEW view_slice_attributes AS
762 slice_attribute.slice_attribute_id,
763 slice_attribute.slice_id,
764 slice_attribute.node_id,
765 slice_attribute_types.attribute_type_id,
766 slice_attribute_types.name,
767 slice_attribute_types.description,
768 slice_attribute_types.min_role_id,
769 slice_attribute.value
771 INNER JOIN slice_attribute_types USING (attribute_type_id);
773 --------------------------------------------------------------------------------
774 -- Built-in maintenance account and default site
775 --------------------------------------------------------------------------------
778 (first_name, last_name, email, password, enabled)
780 ('Maintenance', 'Account', 'maint@localhost.localdomain', 'nopass', true);
782 INSERT INTO person_role (person_id, role_id) VALUES (1, 10);
783 INSERT INTO person_role (person_id, role_id) VALUES (1, 20);
784 INSERT INTO person_role (person_id, role_id) VALUES (1, 30);
785 INSERT INTO person_role (person_id, role_id) VALUES (1, 40);
788 (login_base, name, abbreviated_name, max_slices)
790 ('pl', 'PlanetLab Central', 'PLC', 100);