1 -- @tag: follow_up_created_for_employees
2 -- @description: Wiedervorlagen für mehrere Benutzer ermöglichen
3 -- @depends: follow_ups
5 CREATE TABLE follow_up_created_for_employees (
6 id SERIAL NOT NULL PRIMARY KEY,
7 follow_up_id INTEGER NOT NULL REFERENCES follow_ups(id) ON DELETE CASCADE,
8 employee_id INTEGER NOT NULL REFERENCES employee(id)
11 INSERT INTO follow_up_created_for_employees (follow_up_id, employee_id)
12 SELECT id, created_for_user FROM follow_ups;
14 ALTER TABLE follow_ups DROP COLUMN created_for_user;