Commit ae4b4fb4 by Rene van Lieshout

Add index to deleted_at column in README

parent a5762de0
...@@ -41,7 +41,7 @@ Updating is as simple as `bundle update paranoia`. ...@@ -41,7 +41,7 @@ Updating is as simple as `bundle update paranoia`.
Run: Run:
```shell ```shell
rails generate migration AddDeletedAtToClients deleted_at:datetime rails generate migration AddDeletedAtToClients deleted_at:datetime:index
``` ```
and now you have a migration and now you have a migration
...@@ -50,6 +50,7 @@ and now you have a migration ...@@ -50,6 +50,7 @@ and now you have a migration
class AddDeletedAtToClients < ActiveRecord::Migration class AddDeletedAtToClients < ActiveRecord::Migration
def change def change
add_column :clients, :deleted_at, :datetime add_column :clients, :deleted_at, :datetime
add_index :clients, :deleted_at
end end
end 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