You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,23 @@
1
1
# paranoia Changelog
2
2
3
+
## 2.6.2
4
+
5
+
*[#441](https://github.com/rubysherpas/paranoia/pull/441) Recursive restore with has_many/one through assocs (#441)
6
+
[Emil Ong](https://github.com/emilong)
7
+
8
+
## 2.6.1
9
+
10
+
*[#535](https://github.com/rubysherpas/paranoia/pull/535) Allow to skip updating paranoia_destroy_attributes for records while really_destroy!
11
+
[Anton Bogdanov](https://github.com/kortirso)
12
+
13
+
## 2.6.0
14
+
15
+
*[#512](https://github.com/rubysherpas/paranoia/pull/512) Quote table names; Mysql 8 has keywords that might match table names which cause an exception.
16
+
*[#476](https://github.com/rubysherpas/paranoia/pull/476) Fix syntax error in documentation.
17
+
*[#485](https://github.com/rubysherpas/paranoia/pull/485) Rollback transaction if destroy aborted.
18
+
*[#522](https://github.com/rubysherpas/paranoia/pull/522) Add failing tests for association with abort on destroy.
19
+
*[#513](https://github.com/rubysherpas/paranoia/pull/513) Fix create callback called on destroy.
20
+
3
21
## 2.5.3
4
22
5
23
*[#532](https://github.com/rubysherpas/paranoia/pull/532) Fix: correct bug when sentinel_value is not a timestamp
`paranoia` has some surprising behaviour (like overriding ActiveRecord's `delete` and `destroy`) and is not recommended for new projects. See [`discard`'s README](https://github.com/jhawthorn/discard#why-not-paranoia-or-acts_as_paranoid) for more details.
7
7
@@ -103,6 +103,14 @@ If you really want it gone *gone*, call `really_destroy!`:
103
103
# => client
104
104
```
105
105
106
+
If you need skip updating timestamps for deleting records, call `really_destroy!(update_destroy_attributes: false)`.
107
+
When we call `really_destroy!(update_destroy_attributes: false)` on the parent `client`, then each child `email` will also have `really_destroy!(update_destroy_attributes: false)` called.
'paranoid_has_one_throughs'=>'paranoid_has_through_restore_parent_id INTEGER NOT NULL, empty_paranoid_model_id INTEGER NOT NULL, deleted_at DATETIME',
56
+
'paranoid_has_many_throughs'=>'paranoid_has_through_restore_parent_id INTEGER NOT NULL, empty_paranoid_model_id INTEGER NOT NULL, deleted_at DATETIME',
53
57
}.eachdo |table_name,columns_as_sql_string|
54
58
ActiveRecord::Base.connection.execute"CREATE TABLE #{table_name} (id INTEGER NOT NULL PRIMARY KEY, #{columns_as_sql_string})"
0 commit comments