getTable('mail_accounts'); $inboundPassword = $accounts->getColumn('inbound_password'); /* * The inbound_password was changed with OCA\Mail\Migration\Version0190Date20191118160843 * to notnull = false and default = null, but we received a report where * the former migration was not applied properly. */ if ($inboundPassword->getNotnull() === true || $inboundPassword->getDefault() === '') { $inboundPassword->setNotnull(false); $inboundPassword->setDefault(null); return $schema; } return null; } /** * @return void */ #[\Override] public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { $qb = $this->connection->getQueryBuilder(); $qb->update('mail_accounts') ->set('inbound_password', $qb->createNamedParameter(null, IQueryBuilder::PARAM_NULL)) ->where($qb->expr()->emptyString('inbound_password')); $qb->executeStatement(); } }