From a4091c878a923d7a0919098665906225ebeeb136 Mon Sep 17 00:00:00 2001 From: CiaranG Date: Sat, 7 Mar 2009 23:28:59 +0000 Subject: [PATCH] PostgreSQL - propogated nonce table fix from MySQL version - see bug #1251 or 1179ecd13d68e76d74ad94e2d3ca22d9681eeffe --- db/laconica_pg.sql | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql index 2d83f784a2..d9e0c6da70 100644 --- a/db/laconica_pg.sql +++ b/db/laconica_pg.sql @@ -180,14 +180,13 @@ create table token ( create table nonce ( consumer_key varchar(255) not null /* comment 'unique identifier, root URL' */, tok char(32) not null /* comment 'identifying value' */, - nonce char(32) not null /* comment 'nonce' */, + nonce char(32) null /* comment 'buggy old value, ignored */, ts integer not null /* comment 'timestamp sent' values are epoch, and only used internally */, created timestamp not null default CURRENT_TIMESTAMP /* comment 'date this record was created' */, modified timestamp /* comment 'date this record was modified' */, - primary key (consumer_key, tok, nonce), - foreign key (consumer_key, tok) references token (consumer_key, tok) + primary key (consumer_key, ts, nonce) ); /* One-to-many relationship of user to openid_url */