ALTER TABLE AKUZ.T_APPOINTMENTS_FREQUENCY_DICTIONARY ADD "division" uuid NULL;

ALTER TABLE AKUZ.T_APPOINTMENTS_FREQUENCY_DICTIONARY ADD CONSTRAINT FK_T_DIVISION_T_APPOINTMENTS_FREQUENCY_DICTIONARY_Division
FOREIGN KEY("division") REFERENCES AKUZ.T_DIVISION (DivisionID);

update akuz.t_APPOINTMENTS_FREQUENCY_DICTIONARY freq
set Division = post.Division
from akuz.t_RESOURCE post where post.ResourceID = freq.Post;