Mercurial > gemma
view schema/updates/0000/01.add_schema_version.sql @ 4423:f42c6efd76fe
Waterlevel: only generate csvFilename when dates are present
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 18 Sep 2019 15:37: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; $$;