diff --git a/backend/src/main/resources/db/migration/V16__activate_all_employees.sql b/backend/src/main/resources/db/migration/V16__activate_all_employees.sql new file mode 100644 index 00000000..cbabc11d --- /dev/null +++ b/backend/src/main/resources/db/migration/V16__activate_all_employees.sql @@ -0,0 +1,5 @@ +-- Activate all employees in the users table so they appear in dropdowns +UPDATE users u +SET u.active = TRUE +WHERE u.role IN ('STAFF', 'ADMIN') + AND EXISTS (SELECT 1 FROM employee e WHERE e.user_id = u.id);