From: Mark Huang Date: Wed, 31 Jan 2007 19:54:42 +0000 (+0000) Subject: - remove NOT NULL constraint from slices.creator_person_id in case X-Git-Tag: pycurl-7_13_1~35 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=a8026bd981fbc99e44b74f1b3780805f21e23da2;p=plcapi.git - remove NOT NULL constraint from slices.creator_person_id in case creator is deleted - ensure that encoding is UNICODE - make plc_db_version.subversion part of the schema, and bump to 2 --- diff --git a/planetlab4.sql b/planetlab4.sql index 93a45545..05840cc6 100644 --- a/planetlab4.sql +++ b/planetlab4.sql @@ -9,9 +9,11 @@ -- -- Copyright (C) 2006 The Trustees of Princeton University -- --- $Id: planetlab4.sql,v 1.68 2007/01/30 11:27:12 thierry Exp $ +-- $Id: planetlab4.sql,v 1.69 2007/01/30 23:06:54 mlhuang Exp $ -- +SET client_encoding = 'UNICODE'; + -------------------------------------------------------------------------------- -- Aggregates and store procedures -------------------------------------------------------------------------------- @@ -31,11 +33,11 @@ CREATE AGGREGATE array_accum ( -- Database version CREATE TABLE plc_db_version ( - version integer NOT NULL --- subversion created on demand by plc.d/db + version integer NOT NULL, + subversion integer NOT NULL DEFAULT 0 ) WITH OIDS; -INSERT INTO plc_db_version (version) VALUES (4); +INSERT INTO plc_db_version (version) VALUES (4, 2); -------------------------------------------------------------------------------- -- Accounts @@ -518,7 +520,7 @@ CREATE TABLE slices ( max_nodes integer NOT NULL DEFAULT 100, -- Maximum number of nodes that can be assigned to this slice - creator_person_id integer REFERENCES persons NOT NULL, -- Creator + creator_person_id integer REFERENCES persons, -- Creator created timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP, -- Creation date expires timestamp without time zone NOT NULL DEFAULT CURRENT_TIMESTAMP + '2 weeks', -- Expiration date