We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4187544 commit 2b5cb15Copy full SHA for 2b5cb15
spec/support/referential_integrity.rb
@@ -26,9 +26,11 @@ def without_referential_integrity_postgres
26
27
def without_referential_integrity_mysql
28
#db.disconnect
29
+ puts("#{Time.now} SET FOREIGN_KEY_CHECKS = 0 for db #{db.opts[:database]}")
30
db.run('SET FOREIGN_KEY_CHECKS = 0;')
31
yield
32
ensure
33
+ puts("#{Time.now} SET FOREIGN_KEY_CHECKS = 1 for db #{db.opts[:database]}")
34
db.run('SET FOREIGN_KEY_CHECKS = 1;')
35
end
36
spec/support/table_truncator.rb
@@ -17,6 +17,7 @@ def truncate_tables
17
db.run("TRUNCATE TABLE #{table} RESTART IDENTITY CASCADE;")
18
19
when :mysql
20
+ puts("#{Time.now} Truncating tables")
21
tables.each do |table|
22
db.run("TRUNCATE TABLE #{table};")
23
0 commit comments