From: Sam Hartman Date: Fri, 13 Mar 2015 20:23:06 +0000 (-0400) Subject: Fix sense of comparison in schema. X-Git-Tag: v1.5.1-debian~11 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=commitdiff_plain;h=3ab493d57c1416c5cba54595e6b56d1b8d2870f0 Fix sense of comparison in schema. --- diff --git a/schema.sql b/schema.sql index 006c06b..1e0a5f9 100644 --- a/schema.sql +++ b/schema.sql @@ -1,7 +1,7 @@ create table if not exists psk_keys (keyid text primary key, key blob, client_dh_pub raw(20), key_expiration timestamp); create table if not exists authorizations( client_dh_pub raw(20), coi string, acceptor_realm string, hostname string, apc string); create index if not exists authorizations_dhpub on authorizations( client_dh_pub); -CREATE VIEW if not exists authorizations_keys as select keyid, authorizations.* from psk_keys join authorizations on psk_keys.client_dh_pub = authorizations.client_dh_pub and datetime(key_expiration) < datetime('now'); +CREATE VIEW if not exists authorizations_keys as select keyid, authorizations.* from psk_keys join authorizations on psk_keys.client_dh_pub = authorizations.client_dh_pub and datetime(key_expiration) > datetime('now'); .quit