alter table FINAL_DEGREE_WORK_GROUP add column KEY_PROPOSAL_ATTRIBUTED int(11) default NULL;
alter table FINAL_DEGREE_WORK_GROUP add column KEY_PROPOSAL_ATTRIBUTED_BY_TEACHER int(11) default null;

select concat('update FINAL_DEGREE_WORK_GROUP set FINAL_DEGREE_WORK_GROUP.KEY_PROPOSAL_ATTRIBUTED = ', FINAL_DEGREE_WORK_PROPOSAL.ID_INTERNAL, ' where FINAL_DEGREE_WORK_GROUP.ID_INTERNAL = ', FINAL_DEGREE_WORK_GROUP.ID_INTERNAL, ';') as "" from FINAL_DEGREE_WORK_PROPOSAL inner join FINAL_DEGREE_WORK_GROUP on FINAL_DEGREE_WORK_GROUP.ID_INTERNAL = FINAL_DEGREE_WORK_PROPOSAL.KEY_GROUP_ATTRIBUTED;
select concat('update FINAL_DEGREE_WORK_GROUP set FINAL_DEGREE_WORK_GROUP.KEY_PROPOSAL_ATTRIBUTED_BY_TEACHER = ', FINAL_DEGREE_WORK_PROPOSAL.ID_INTERNAL, ' where FINAL_DEGREE_WORK_GROUP.ID_INTERNAL = ', FINAL_DEGREE_WORK_GROUP.ID_INTERNAL, ';') as "" from FINAL_DEGREE_WORK_PROPOSAL inner join FINAL_DEGREE_WORK_GROUP on FINAL_DEGREE_WORK_GROUP.ID_INTERNAL = FINAL_DEGREE_WORK_PROPOSAL.KEY_GROUP_ATTRIBUTED_BY_TEACHER;
