Index: branches/5.2.x/core/install/upgrades.php =================================================================== --- branches/5.2.x/core/install/upgrades.php +++ branches/5.2.x/core/install/upgrades.php @@ -2058,6 +2058,11 @@ $table_name = $this->Application->getUnitOption('email-template', 'TableName'); $fields = $this->Conn->Query('DESCRIBE ' . $table_name, 'Field'); + // The "_renameTables" method doesn't rename IDField, so find real one in DESCRIBE result. + if ( !isset($fields[$id_field]) ) { + $id_field = 'EventId'; + } + if ( !isset($fields['l1_Body']) ) { // column dropped - nothing to convert anymore return;