weaver-hrm-salary/resource/sqlupgrade/PG/sql202308150303.sql

22 lines
835 B
SQL

alter table hrsa_salary_sob_item add income_category varchar(100);
/
alter table hrsa_salary_sob_item alter column income_category set default '1';
/
update hrsa_salary_sob_item set income_category = '1' where salary_sob_id IN
(select id from hrsa_salary_sob where hrsa_salary_sob.income_category = '1');
/
update hrsa_salary_sob_item set income_category = '2' where salary_sob_id IN
(select id from hrsa_salary_sob where hrsa_salary_sob.income_category = '2');
/
update hrsa_salary_sob_item set income_category = '4' where salary_sob_id IN
(select id from hrsa_salary_sob where hrsa_salary_sob.income_category = '4');
/
alter table hrsa_salary_sob_item add salary_item_code varchar(100);
/
update hrsa_salary_sob_item a set salary_item_code = b.code from hrsa_salary_item b where a.salary_item_id = b.id and a.delete_type = 0;
/