Fix sense of comparison in schema.
authorSam Hartman <hartmans@debian.org>
Fri, 13 Mar 2015 20:23:06 +0000 (16:23 -0400)
committerSam Hartman <hartmans@debian.org>
Fri, 13 Mar 2015 20:23:28 +0000 (16:23 -0400)
schema.sql

index 006c06b..1e0a5f9 100644 (file)
@@ -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