X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=database%2Fwiki.sql;h=2ec29f6c624cfd1561acc4f001608fd8cece9f72;hb=30262dafa6c73a1d1cbb493e66b59e267eaa6682;hp=1d00c01f2563836e96680c4b60e454377a280da1;hpb=2c934746290ce8baa0b38425e1fd74d63a2a12f5;p=ndwebbie.git 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;