0004-auditor_reserve_in_inconsistency.sql (1054B)
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 -- TALER_AUDITORDB_get_reserve_in_inconsistency() looks up the most recent 18 -- finding for a bank row. bank_row_id is not unique, so support the 19 -- "ORDER BY row_id DESC LIMIT 1" lookup with an index. 20 CREATE INDEX IF NOT EXISTS auditor_reserve_in_inconsistency_by_bank_row_id 21 ON auditor_reserve_in_inconsistency 22 (bank_row_id ASC 23 ,row_id DESC);