Commit f84965e9 authored by Enriko Käsper's avatar Enriko Käsper
Browse files

Merge branch 'hotfix/created_at_fix' into 'master'

Release: merge 'hotfix-created-at-fix' into 'master' created by Enriko Käsper

See merge request teis/classifiers-service!74
parents c89a79d7 eec6d0dd
theGroup=ee.sm.ti.teis
theVersion=1.16.0
theVersion=1.16.1
commonsVersion=1.17.0
officeApiGatewayVersion=1.17.0
schedulerVersion=1.12.0
......
--liquibase formatted sql
--changeset enriko:2021-01-14.TEIS-924.generate-created_at-values.sql splitStatements:false
--changeset enriko:2021-01-14.TEIS-924.generate-created_at-values_v2 splitStatements:false
create or replace function fill_created_at_value(tableName varchar, idType varchar)
returns void
......@@ -14,10 +14,10 @@ begin
select createdAt + interval '1 second' into createdAt;
if idType = 'uuid' then
-- RAISE NOTICE 'ID= "%"', rec.id::text;
execute 'update ' || quote_ident(tableName) || ' set created_by = ''SYSTEM'', created_at = ''' || createdAt || ''', modified_at = ''' || createdAt || ''' where id=''' || rec.id::text || '''';
execute 'update ' || quote_ident(tableName) || ' set created_by = ''SYSTEM'', created_at = ''' || createdAt || ''' where id=''' || rec.id::text || '''';
else
-- RAISE NOTICE 'ID str= "%"', rec.id;
execute 'update ' || quote_ident(tableName) || ' set created_by = ''SYSTEM'', created_at = ''' || createdAt || ''', modified_at = ''' || createdAt || ''' where id=''' || rec.id || '''';
execute 'update ' || quote_ident(tableName) || ' set created_by = ''SYSTEM'', created_at = ''' || createdAt || ''' where id=''' || rec.id || '''';
end if;
-- RAISE NOTICE 'createdAt "%"', createdAt;
end loop;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment