diff --git a/libraries/plugins/export/ExportSql.class.php b/libraries/plugins/export/ExportSql.class.php index c0b6aa5f01..69b00b38eb 100644 --- a/libraries/plugins/export/ExportSql.class.php +++ b/libraries/plugins/export/ExportSql.class.php @@ -1730,7 +1730,8 @@ class ExportSql extends ExportPlugin // Removing the `AUTO_INCREMENT` attribute from the `CREATE TABLE` // too. if (!empty($statement->entityOptions) - && empty($GLOBALS['sql_if_not_exists']) + && (empty($GLOBALS['sql_if_not_exists']) + || empty($GLOBALS['sql_auto_increment'])) ) { $statement->entityOptions->remove('AUTO_INCREMENT'); }