Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paranoia
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paranoia
Commits
68f59c57
Commit
68f59c57
authored
May 09, 2015
by
Yann Hourdel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
partial indexes advice
parent
e1320fb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
README.md
+19
-0
No files found.
README.md
View file @
68f59c57
...
@@ -184,6 +184,25 @@ before_restore :callback_name_goes_here
...
@@ -184,6 +184,25 @@ before_restore :callback_name_goes_here
For more information, please look at the tests.
For more information, please look at the tests.
#### About indexes:
Beware that you should adapt all your indexes for them to work as fast as previously.
For example,
```
ruby
add_index
:clients
,
:group_id
add_index
:clients
,
[
:group_id
,
:other_id
]
```
should be replaced with
```
ruby
add_index
:clients
,
:group_id
,
where:
"deleted_at IS NULL"
add_index
:clients
,
[
:group_id
,
:other_id
],
where:
"deleted_at IS NULL"
```
Of course, this is not necessary for the indexes you always use in association with
`with_deleted`
or
`only_deleted`
.
## Acts As Paranoid Migration
## Acts As Paranoid Migration
You can replace the older
`acts_as_paranoid`
methods as follows:
You can replace the older
`acts_as_paranoid`
methods as follows:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment