view schema/updates/0000/01.add_schema_version.sql @ 5510:b7792e8d5c62 deactivate-users

Client: Improve users-table layout * Make editing/reactivating of users more recognizable by adding a reactive/edit button to the action column, that behaves according to the user's status(active,inactive). * Disable clicking the other cells for editing user.
author Fadi Abbud <fadi.abbud@intevation.de>
date Wed, 29 Sep 2021 17:10:42 +0200
parents 7b7c324b318f
children
line wrap: on
line source

CREATE TABLE gemma_schema_version (
    version int PRIMARY KEY,
    update_date timestamp with time zone NOT NULL DEFAULT CURRENT_TIMESTAMP
);

CREATE OR REPLACE FUNCTION get_schema_version() RETURNS int
    LANGUAGE plpgsql
    AS $$
    BEGIN
        RETURN ( SELECT max(version) FROM gemma_schema_version );
    END;
$$;