From: Greg Sabino Mullane Date: Wed, 7 Feb 2007 16:02:21 +0000 (+0000) Subject: Whitespace fixing, change to_date to to_timestamp for archive rule X-Git-Tag: 1.31.0-rc.0~54106 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=29abbb2c21ba303b403ed3200e98c3b210f24506;p=lhc%2Fweb%2Fwiklou.git Whitespace fixing, change to_date to to_timestamp for archive rule --- diff --git a/maintenance/postgres/tables.sql b/maintenance/postgres/tables.sql index a7c72212aa..0bea5f86ff 100644 --- a/maintenance/postgres/tables.sql +++ b/maintenance/postgres/tables.sql @@ -110,12 +110,12 @@ CREATE TABLE pagecontent ( -- replaces reserved word 'text' CREATE TABLE page_restrictions ( - pr_page INTEGER NULL REFERENCES page (page_id) ON DELETE CASCADE, - pr_type TEXT NOT NULL, - pr_level TEXT NOT NULL, - pr_cascade SMALLINT NOT NULL, - pr_user INTEGER NULL, - pr_expiry TIMESTAMPTZ NULL + pr_page INTEGER NULL REFERENCES page (page_id) ON DELETE CASCADE, + pr_type TEXT NOT NULL, + pr_level TEXT NOT NULL, + pr_cascade SMALLINT NOT NULL, + pr_user INTEGER NULL, + pr_expiry TIMESTAMPTZ NULL ); ALTER TABLE page_restrictions ADD CONSTRAINT page_restrictions_pk PRIMARY KEY (pr_page,pr_type); @@ -146,7 +146,7 @@ FROM archive2; CREATE RULE archive_insert AS ON INSERT TO archive DO INSTEAD INSERT INTO archive2 VALUES ( NEW.ar_namespace, NEW.ar_title, NEW.ar_text, NEW.ar_comment, NEW.ar_user, NEW.ar_user_text, - TO_DATE(NEW.ar_timestamp, 'YYYYMMDDHH24MISS'), + TO_TIMESTAMP(NEW.ar_timestamp, 'YYYYMMDDHH24MISS'), NEW.ar_minor_edit, NEW.ar_flags, NEW.ar_rev_id, NEW.ar_text_id );