From 453e81e57e3c9f00489d22ac457e4195fe7a5f28 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Wed, 15 Feb 2023 18:57:11 +0200 Subject: [PATCH] updated sql script --- .../main/data/upgrade/3.4.4/schema_update.sql | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/application/src/main/data/upgrade/3.4.4/schema_update.sql b/application/src/main/data/upgrade/3.4.4/schema_update.sql index 83d148e914..1a06d33d52 100644 --- a/application/src/main/data/upgrade/3.4.4/schema_update.sql +++ b/application/src/main/data/upgrade/3.4.4/schema_update.sql @@ -35,15 +35,9 @@ CREATE TABLE IF NOT EXISTS user_settings ( ALTER TABLE user_credentials ADD COLUMN IF NOT EXISTS additional_info varchar; -CREATE OR REPLACE PROCEDURE migrate_password_history() - LANGUAGE plpgsql AS -$$ -BEGIN - UPDATE user_credentials AS c - SET additional_info = u.additional_info - FROM tb_user AS u - WHERE u.id = c.id; -END; -$$; --- USER PASSWORD MIGRATION END -call migrate_password_history(); \ No newline at end of file +UPDATE user_credentials AS c + SET additional_info = u.additional_info FROM tb_user AS u + WHERE u.id = c.user_id AND u.additional_info is not null; + +UPDATE tb_user + SET additional_info = null WHERE id is not null; \ No newline at end of file