--
-- Copyright (C) 2006 The Trustees of Princeton University
--
--- $Id: planetlab4.sql,v 1.56 2006/12/20 14:06:40 tmack Exp $
+-- $Id: planetlab4.sql,v 1.62 2007/01/16 17:03:01 mlhuang Exp $
--
--------------------------------------------------------------------------------
INSERT INTO roles (role_id, name) VALUES (20, 'pi');
INSERT INTO roles (role_id, name) VALUES (30, 'user');
INSERT INTO roles (role_id, name) VALUES (40, 'tech');
-INSERT INTO roles (role_id, name) VALUES (1000, 'node');
-INSERT INTO roles (role_id, name) VALUES (2000, 'anonymous');
--- xxx not sure this us useful yet
---INSERT INTO roles (role_id, name) VALUES (3000, 'peer');
CREATE TABLE person_role (
person_id integer REFERENCES persons NOT NULL, -- Account identifier
fault_code integer NOT NULL DEFAULT 0, -- Did this event result in error
call_name text NOT NULL, -- Call responsible for this event
call text NOT NULL, -- Call responsible for this event, including parameters
+ object_type text, -- What type of object is this event affecting
message text, -- High level description of this event
runtime float DEFAULT 0, -- Event run time
time timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP -- Event timestamp
persons.enabled,
persons.password,
persons.verification_key,
-persons.verification_expires,
+CAST(date_part('epoch', persons.verification_expires) AS bigint) AS verification_expires,
persons.title,
persons.phone,
persons.url,