SQLSTATE[42804]: Datatype mismatch: 7 ERROR:  column "inv_matrix_flag" is of type boolean but expression is of type integer
LINE 6:                     inv_matrix_flag = rm.inv_matrix_flag,
                                              ^
HINT:  You will need to rewrite or cast the expression. (Connection: pgsql, SQL: 
                UPDATE m_store_raw_materials srm
                SET 
                    lsm_flag = rm.lsm_flag,
                    spb_flag = rm.spb_flag,
                    inv_matrix_flag = rm.inv_matrix_flag,
                    period_id = rm.period_id
                FROM m_raw_materials rm
                WHERE srm.raw_material_id = rm.id
            )