From 78b7371c6f69c6bea0f5758a1f5bc4f06fa760fb Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 14 Jul 2006 20:06:19 +0000 Subject: [PATCH] using timestamptz instead of date git-svn-id: svn://svn.open-ils.org/ILS/trunk@5012 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/005.schema.actors.sql | 46 +++++++++++------------ Open-ILS/src/sql/Pg/090.schema.action.sql | 20 +++++----- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Open-ILS/src/sql/Pg/005.schema.actors.sql b/Open-ILS/src/sql/Pg/005.schema.actors.sql index 396b046111..2aac0893a6 100644 --- a/Open-ILS/src/sql/Pg/005.schema.actors.sql +++ b/Open-ILS/src/sql/Pg/005.schema.actors.sql @@ -26,42 +26,42 @@ COMMENT ON SCHEMA actor IS $$ $$; CREATE TABLE actor.usr ( - id SERIAL PRIMARY KEY, - card INT UNIQUE, -- active card - profile INT NOT NULL, -- patron profile - usrname TEXT NOT NULL UNIQUE, + id SERIAL PRIMARY KEY, + card INT UNIQUE, -- active card + profile INT NOT NULL, -- patron profile + usrname TEXT NOT NULL UNIQUE, email TEXT, - passwd TEXT NOT NULL, - standing INT NOT NULL DEFAULT 1 REFERENCES config.standing (id), - ident_type INT NOT NULL REFERENCES config.identification_type (id), + passwd TEXT NOT NULL, + standing INT NOT NULL DEFAULT 1 REFERENCES config.standing (id), + ident_type INT NOT NULL REFERENCES config.identification_type (id), ident_value TEXT, - ident_type2 INT REFERENCES config.identification_type (id), + ident_type2 INT REFERENCES config.identification_type (id), ident_value2 TEXT, - net_access_level INT NOT NULL DEFAULT 1 REFERENCES config.net_access_level (id), + net_access_level INT NOT NULL DEFAULT 1 REFERENCES config.net_access_level (id), photo_url TEXT, prefix TEXT, - first_given_name TEXT NOT NULL, + first_given_name TEXT NOT NULL, second_given_name TEXT, - family_name TEXT NOT NULL, + family_name TEXT NOT NULL, suffix TEXT, day_phone TEXT, evening_phone TEXT, other_phone TEXT, mailing_address INT, billing_address INT, - home_ou INT NOT NULL, - dob DATE NOT NULL, - active BOOL NOT NULL DEFAULT TRUE, - master_account BOOL NOT NULL DEFAULT FALSE, - super_user BOOL NOT NULL DEFAULT FALSE, - barred BOOL NOT NULL DEFAULT FALSE, - usrgroup SERIAL NOT NULL, - claims_returned_count INT NOT NULL DEFAULT 0, - credit_forward_balance NUMERIC(6,2) NOT NULL DEFAULT 0.00, - last_xact_id TEXT NOT NULL DEFAULT 'none', + home_ou INT NOT NULL, + dob TIMESTAMP WITH TIME ZONE NOT NULL, + active BOOL NOT NULL DEFAULT TRUE, + master_account BOOL NOT NULL DEFAULT FALSE, + super_user BOOL NOT NULL DEFAULT FALSE, + barred BOOL NOT NULL DEFAULT FALSE, + usrgroup SERIAL NOT NULL, + claims_returned_count INT NOT NULL DEFAULT 0, + credit_forward_balance NUMERIC(6,2) NOT NULL DEFAULT 0.00, + last_xact_id TEXT NOT NULL DEFAULT 'none', alert_message TEXT, - create_date DATE NOT NULL DEFAULT now()::DATE, - expire_date DATE NOT NULL DEFAULT (now() + '3 years'::INTERVAL)::DATE + create_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), + expire_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT (now() + '3 years'::INTERVAL) ); COMMENT ON TABLE actor.usr IS $$ /* diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql index 617264645f..3eaa4edb11 100644 --- a/Open-ILS/src/sql/Pg/090.schema.action.sql +++ b/Open-ILS/src/sql/Pg/090.schema.action.sql @@ -22,16 +22,16 @@ CREATE TABLE action.non_cataloged_circulation ( ); CREATE TABLE action.survey ( - id SERIAL PRIMARY KEY, - owner INT NOT NULL REFERENCES actor.org_unit (id), - start_date DATE NOT NULL DEFAULT NOW(), - end_date DATE NOT NULL DEFAULT NOW() + '10 years'::INTERVAL, - usr_summary BOOL NOT NULL DEFAULT FALSE, - opac BOOL NOT NULL DEFAULT FALSE, - poll BOOL NOT NULL DEFAULT FALSE, - required BOOL NOT NULL DEFAULT FALSE, - name TEXT NOT NULL, - description TEXT NOT NULL + id SERIAL PRIMARY KEY, + owner INT NOT NULL REFERENCES actor.org_unit (id), + start_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), + end_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() + '10 years'::INTERVAL, + usr_summary BOOL NOT NULL DEFAULT FALSE, + opac BOOL NOT NULL DEFAULT FALSE, + poll BOOL NOT NULL DEFAULT FALSE, + required BOOL NOT NULL DEFAULT FALSE, + name TEXT NOT NULL, + description TEXT NOT NULL ); CREATE UNIQUE INDEX asv_once_per_owner_idx ON action.survey (owner,name); -- 2.43.2