diff options
author | alecpl <alec@alec.pl> | 2008-11-21 14:33:58 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2008-11-21 14:33:58 +0000 |
commit | be7d3b6918ff90757d10804ac914edb5a65f4828 (patch) | |
tree | abc0e0ab2a4876a05692503d748f3370e8999aa2 /SQL/postgres.initial.sql | |
parent | bd0c2b0a341c5440c66f9b0e9d2ad2b869401f03 (diff) |
- Fix 'cache' table cleanup on session destroy (#1485516)
Diffstat (limited to 'SQL/postgres.initial.sql')
-rw-r--r-- | SQL/postgres.initial.sql | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/SQL/postgres.initial.sql b/SQL/postgres.initial.sql index 88f12af66..e53caa187 100644 --- a/SQL/postgres.initial.sql +++ b/SQL/postgres.initial.sql @@ -128,13 +128,14 @@ CREATE SEQUENCE cache_ids CREATE TABLE "cache" ( cache_id integer DEFAULT nextval('cache_ids'::text) PRIMARY KEY, user_id integer NOT NULL REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE, - session_id character varying(40) REFERENCES "session" (sess_id), + session_id character varying(40) REFERENCES "session" (sess_id) ON DELETE CASCADE ON UPDATE CASCADE, cache_key character varying(128) DEFAULT ''::character varying NOT NULL, created timestamp with time zone DEFAULT now() NOT NULL, data text NOT NULL ); CREATE INDEX cache_user_id_idx ON "cache" (user_id, cache_key); +CREATE INDEX cache_session_id_idx ON "cache" (session_id); -- -- Sequence "message_ids" |