Class: ActiveRecord::ConnectionAdapters::SQLite3Adapter

Inherits:
SQLITE_ADAPTER_PARENT
  • Object
show all
Defined in:
lib/database_cleaner/active_record/truncation.rb

Instance Method Summary collapse

Instance Method Details

#delete_table(table_name) ⇒ Object Also known as: truncate_table



63
64
65
66
# File 'lib/database_cleaner/active_record/truncation.rb', line 63

def delete_table(table_name)
  execute("DELETE FROM #{quote_table_name(table_name)};")
  execute("DELETE FROM sqlite_sequence where name = '#{table_name}';")
end