challenger

OAuth 2.0-based authentication service that validates user can receive messages at a certain address
Log | Files | Refs | Submodules | README | LICENSE

challenger-0003.sql (1254B)


      1 --
      2 -- This file is part of Challenger
      3 -- Copyright (C) 2023 Taler Systems SA
      4 --
      5 -- Challenger 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 -- Challenger 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 -- Challenger; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15 --
     16 
     17 -- Everything in one big transaction
     18 BEGIN;
     19 
     20 -- Check patch versioning is in place.
     21 SELECT _v.register_patch('challenger-0003', NULL, NULL);
     22 
     23 SET search_path TO challenger;
     24 
     25 ALTER TABLE validations
     26   ALTER COLUMN code_challenge_method SET NOT NULL;
     27 
     28 CREATE INDEX IF NOT EXISTS tokens_by_expiration
     29   ON tokens(token_expiration_time);
     30 COMMENT ON INDEX tokens_by_expiration
     31   IS 'for gc by expiration';
     32 
     33 -- These indices were redundant, columns are already UNIQUE
     34 DROP INDEX clients_serial;
     35 DROP INDEX validations_serial;
     36 
     37 
     38 COMMIT;