From de694b768d3bd3a969f88324b44e9e84d851a08f Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Wed, 13 Aug 2008 15:25:09 +0200 Subject: [PATCH] Good to have time if we want to list most recent changes --- database/wiki.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/database/wiki.sql b/database/wiki.sql index 1d00c01..2ec29f6 100644 --- a/database/wiki.sql +++ b/database/wiki.sql @@ -7,6 +7,7 @@ CREATE TABLE wiki_pages ( name VARCHAR(255) NOT NULL, namespace TExt NOT NULL REFERENCES wiki_namespaces(namespace) DEFAULT '', textsearch tsvector NOT NULL DEFAULT to_tsvector(''), + time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), UNIQUE(namespace,name) ); @@ -35,6 +36,7 @@ BEGIN WHERE NEW.wprev = wpr.wprev; NEW.textsearch := rec.ts || setweight(to_tsvector(NEW.namespace || ':' || NEW.name), 'A'); + NEW.time = NOW(); return NEW; END; $$ LANGUAGE plpgsql; -- 2.39.2