ALTER TABLE data_list RENAME COLUMN id_exercise TO id_from_exercise;
ALTER TABLE data_list ADD id_to_exercise SMALLINT REFERENCES exercise(id_exercise);
UPDATE data_list SET id_to_exercise = id_from_exercise WHERE id_to_exercise IS NOT NULL;
ALTER TABLE data_list ADD id_competence SMALLINT REFERENCES competence(id_competence);

