From 1b23857f2cb56f4aa95a07d7c52bd48abc20b73b Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Thu, 23 Dec 2021 15:15:33 +0100 Subject: [age restriction] progress 8/n More work towards support for extensions and age restriction - updated gana - added handler for DB-Event - added TEH_extensions_init() and _done() - added global for age restriction - added stub for post handler - added SQL-table for extension metadata - added enum type for extensions and other data structures Also: - fixed some warnings -Wmaybe-unitialized --- src/exchangedb/exchange-0001.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/exchangedb') diff --git a/src/exchangedb/exchange-0001.sql b/src/exchangedb/exchange-0001.sql index dcd0cb09..1c532d42 100644 --- a/src/exchangedb/exchange-0001.sql +++ b/src/exchangedb/exchange-0001.sql @@ -280,6 +280,22 @@ COMMENT ON TABLE signkey_revocations IS 'Table storing which online signing keys have been revoked'; +CREATE TABLE IF NOT EXISTS extensions + (extension_id BIGSERIAL UNIQUE + ,name VARCHAR NOT NULL UNIQUE + ,config BYTEA NOT NULL + ,config_sig BYTEA NOT NULL + ); +COMMENT ON TABLE extensions + IS 'Configurations of the activated extensions'; +COMMENT ON COLUMN extensions.name + IS 'Name of the extension'; +COMMENT ON COLUMN extensions.config + IS 'Configuration of the extension as JSON-blob'; +COMMENT ON COLUMN extensions.config + IS 'Signature of the configuration of an extension, signed with the master key of the exchange'; + + CREATE TABLE IF NOT EXISTS known_coins (known_coin_id BIGSERIAL UNIQUE ,coin_pub BYTEA NOT NULL PRIMARY KEY CHECK (LENGTH(coin_pub)=32) -- cgit v1.2.3