exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

0002-auditors.sql (1544B)


      1 --
      2 -- This file is part of TALER
      3 -- Copyright (C) 2014--2022 Taler Systems SA
      4 --
      5 -- TALER is free software; you can redistribute it and/or modify it under the
      6 -- terms of the GNU General Public License as published by the Free Software
      7 -- Foundation; either version 3, or (at your option) any later version.
      8 --
      9 -- TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     10 -- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     11 -- A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     12 --
     13 -- You should have received a copy of the GNU General Public License along with
     14 -- TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15 --
     16 
     17 
     18 CREATE TABLE auditors
     19   (auditor_uuid BIGINT GENERATED BY DEFAULT AS IDENTITY UNIQUE
     20   ,auditor_pub BYTEA PRIMARY KEY CHECK (LENGTH(auditor_pub)=32)
     21   ,auditor_name TEXT NOT NULL
     22   ,auditor_url TEXT NOT NULL
     23   ,is_active BOOLEAN NOT NULL
     24   ,last_change INT8 NOT NULL
     25   );
     26 COMMENT ON TABLE auditors
     27   IS 'Table with auditors the exchange uses or has used in the past. Entries never expire as we need to remember the last_change column indefinitely.';
     28 COMMENT ON COLUMN auditors.auditor_pub
     29   IS 'Public key of the auditor.';
     30 COMMENT ON COLUMN auditors.auditor_url
     31   IS 'The base URL of the auditor.';
     32 COMMENT ON COLUMN auditors.is_active
     33   IS 'true if we are currently supporting the use of this auditor.';
     34 COMMENT ON COLUMN auditors.last_change
     35   IS 'Latest time when active status changed. Used to detect replays of old messages.';