From 644a218e016fa7c5c68aa92d8f10a76142af1fa8 Mon Sep 17 00:00:00 2001 From: Eugene Kenny Date: Wed, 5 Jun 2024 14:39:48 +0100 Subject: [PATCH] Fix reset_ids test with Trilogy adapter (#93) aafa5b273bebf9432353fc8a65ce1e8b449cecb0 was merged after 7da2abea9a09c8981f6f864de99fdcc5224764a7, and did not handle Trilogy. --- lib/database_cleaner/active_record/deletion.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/database_cleaner/active_record/deletion.rb b/lib/database_cleaner/active_record/deletion.rb index 6b6e41e8..8caad35a 100644 --- a/lib/database_cleaner/active_record/deletion.rb +++ b/lib/database_cleaner/active_record/deletion.rb @@ -29,7 +29,7 @@ def delete_table connection, table_name def reset_id_sequence connection, table_name case connection.adapter_name - when 'Mysql2' + when 'Mysql2', 'Trilogy' connection.execute("ALTER TABLE #{table_name} AUTO_INCREMENT = 1;") when 'SQLite' connection.execute("delete from sqlite_sequence where name='#{table_name}';")