exchange

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

exchange-0014.sql (1648B)


      1 --
      2 -- This file is part of TALER
      3 -- Copyright (C) 2026 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 BEGIN;
     18 
     19 SELECT _v.register_patch('exchange-0014', NULL, NULL);
     20 
     21 SET search_path TO exchange;
     22 
     23 CREATE FUNCTION alter_table_wire_out14()
     24 RETURNS void
     25 LANGUAGE plpgsql
     26 AS $$
     27 DECLARE
     28 BEGIN
     29   -- Which of our own bank accounts did we debit for this transfer? Merchants
     30   -- are shown this so that they can find the credit in their bank statement
     31   -- by filtering on the originating account.  NULL for rows written before
     32   -- this column existed, so consumers must treat it as optional forever.
     33   ALTER TABLE wire_out
     34     ADD COLUMN exchange_payto_uri
     35       TEXT DEFAULT (NULL);
     36   COMMENT ON COLUMN wire_out.exchange_payto_uri
     37     IS 'full payto://-URI of the exchange bank account that was debited; NULL if unknown (transfer predates this column)';
     38 END
     39 $$;
     40 
     41 
     42 INSERT INTO exchange_tables
     43     (name
     44     ,version
     45     ,action
     46     ,partitioned
     47     ,by_range)
     48   VALUES
     49     ('wire_out14'
     50     ,'exchange-0014'
     51     ,'alter'
     52     ,TRUE
     53     ,FALSE);
     54 
     55 
     56 COMMIT;