database_cleaner 0.6.4 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
== 0.6.x (in git)
|
2
2
|
|
3
|
+
== 0.6.5 2011-03-08
|
4
|
+
|
5
|
+
=== Bugfixes
|
6
|
+
* When truncating in postgresql (>= 8.4) sequences are now reset. (Greg Barnett)
|
7
|
+
* Fixes the MongoDB truncation so non system collections starting with 'system' are not excluded for truncation. (Dmitry Naumov)
|
8
|
+
|
3
9
|
== 0.6.4 2011-02-21
|
4
10
|
|
5
11
|
=== Bugfixes
|
data/VERSION.yml
CHANGED
@@ -70,8 +70,12 @@ module ActiveRecord
|
|
70
70
|
@cascade ||= db_version >= "08.02" ? "CASCADE" : ""
|
71
71
|
end
|
72
72
|
|
73
|
+
def restart_identity
|
74
|
+
@restart_identity ||= db_version >= "08.04" ? "RESTART IDENTITY" : ""
|
75
|
+
end
|
76
|
+
|
73
77
|
def truncate_table(table_name)
|
74
|
-
execute("TRUNCATE TABLE #{quote_table_name(table_name)} #{cascade};")
|
78
|
+
execute("TRUNCATE TABLE #{quote_table_name(table_name)} #{restart_identity} #{cascade};")
|
75
79
|
end
|
76
80
|
|
77
81
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: database_cleaner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 5
|
10
|
+
version: 0.6.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ben Mabey
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-03-08 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|