Commit b3d3d007 authored by Jürgen Hannus's avatar Jürgen Hannus
Browse files

Merge branch 'develop' into 'master'

Release: merge 'develop' into 'master' created by Jürgen Hannus

See merge request teis/officials-service!48
parents 317299a1 4fbd2935
# Changelog
## [1.10.0] - 2021-01-22
* generated created_at and modified_at values in existing records where values missing
## [1.9.0] - 2020-10-30
* removed Camunda BPMN dependency
* updated Spring Boot framework to version 2.3.4.RELEASE
* updated teis-gradle-plugin version to latest which contains different Gradle dependency configuration sets (functionalities) and therefore Gradle configuration was stripped down from microservice configuration
* updated teis-gradle-plugin version to latest which contains different Gradle dependency configuration sets (
functionalities) and therefore Gradle configuration was stripped down from microservice configuration
* updated Gradle Wrapper to version 5.6.4
\ No newline at end of file
theGroup=ee.sm.ti.teis
theVersion=1.9.0
theVersion=1.10.0
commonsVersion=1.14.0
officeApiGatewayVersion=1.14.0
pluginVersion=1.2.0
--liquibase formatted sql
--changeset enriko:2021-01-20.TEIS-1784.generate-created_at-values.sql splitStatements:false
create or replace function fill_created_at_value(tableName varchar, idType varchar)
returns void
as $$
declare
createdAt timestamp;
rec record;
begin
select to_timestamp('2020-03-31 08:00:00', 'YYYY-MM-DD HH24:MI:SS') into createdAt;
for rec in execute 'select * from ' || quote_ident(tableName) || ' where created_at is null' LOOP
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 || '''';
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 || '''';
end if;
-- RAISE NOTICE 'createdAt "%"', createdAt;
end loop;
end $$
language plpgsql;
select fill_created_at_value('office', 'uuid');
drop function fill_created_at_value(varchar, varchar);
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