Use json_is_true() in place of json_boolean_value() for compatibility
[trust_router.git] / schema.sql
1 create table if not exists psk_keys_tab(keyid text primary key, key blob, client_dh_pub raw(20), key_expiration timestamp);
2 create table if not exists authorizations( client_dh_pub raw(20), coi string, acceptor_realm string, hostname string, apc string);
3 create index if not exists authorizations_dhpub on authorizations( client_dh_pub);
4 create view if not exists psk_keys as select * from psk_keys_tab where  datetime(key_expiration) > datetime('now');
5 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;
6  
7
8 .quit
9
10