Mercurial > gemma
view schema/updates/1101/01.improve_del_import.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 | 52f7264265bb |
children |
line wrap: on
line source
CREATE OR REPLACE FUNCTION import.del_import(imp_id int) RETURNS void AS $$ DECLARE tmp RECORD; BEGIN FOR tmp IN SELECT relation, array_agg(key) AS keys FROM import.track_imports WHERE import_id = imp_id AND NOT deletion GROUP BY relation LOOP EXECUTE format('DELETE FROM %s WHERE id = ANY($1)', tmp.relation) USING tmp.keys; END LOOP; END; $$ LANGUAGE plpgsql;