diff --git a/tests/lib/DatabaseDrivers/MySQL.php b/tests/lib/DatabaseDrivers/MySQL.php index 0df43d3f..9363a59f 100644 --- a/tests/lib/DatabaseDrivers/MySQL.php +++ b/tests/lib/DatabaseDrivers/MySQL.php @@ -59,14 +59,13 @@ trait MySQL { if ($table === "arsse_meta") { $db->query("DELETE FROM $table where `key` <> 'schema_version'"); } else { - $db->query("DELETE FROM $table"); + $db->query("TRUNCATE TABLE $table"); } - $db->query("ALTER TABLE $table auto_increment = 1"); } - $db->query("SET FOREIGN_KEY_CHECKS=1"); foreach ($afterStatements as $st) { $db->query($st); } + $db->query("SET FOREIGN_KEY_CHECKS=1"); } public static function dbRaze($db, array $afterStatements = []): void { @@ -79,9 +78,9 @@ trait MySQL { foreach (self::dbTableList($db) as $table) { $db->query("DROP TABLE IF EXISTS $table"); } - $db->query("SET FOREIGN_KEY_CHECKS=1"); foreach ($afterStatements as $st) { $db->query($st); } + $db->query("SET FOREIGN_KEY_CHECKS=1"); } }