This reverts commit 4b9ab649af.
Ooops: ERROR: Icinga\Exception\IcingaException in /workdir/icingaweb2-modules/director/library/Director/Db/Migration.php:50 with message: Migration 150 failed (SQLSTATE[HY000]: General error: 1093 Table 'icinga_user' is specified twice, both as a target for 'UPDATE' and as a separate source for data) while running UPDATE icinga_user
SET period_id = NULL
WHERE id IN (
SELECT DISTINCT u.id
FROM icinga_user u
LEFT JOIN icinga_timeperiod tp ON tp.id = u.period_id
WHERE u.period_id IS NOT NULL AND tp.id IS NULL
);