Commit 132221c6 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Exclude ar_internal_metadata from DB cleaner

There's a bug in DatabaseCleaner where it deletes
ar_internal_metadata when cache_tables is false
parent 23216ee8
# frozen_string_literal: true
module DbCleaner
def delete_from_all_tables!(except: nil)
def delete_from_all_tables!(except: [])
except << 'ar_internal_metadata'
DatabaseCleaner.clean_with(:deletion, cache_tables: false, except: except)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment