Commit Graph

3 Commits

Author SHA1 Message Date
Markus Frosch 4df7e8a23f schema/150: Add constraint from user to period 2018-09-06 10:46:04 +02:00
Thomas Gelf fbef8866ce Revert "schema/150: Add constraint from user to period"
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
);
2018-09-05 18:32:52 +02:00
Markus Frosch 4b9ab649af schema/150: Add constraint from user to period 2018-09-05 18:28:55 +02:00