Commit f878014d by Mauro George

more info about migration on readme

parent af5a2f85
...@@ -46,15 +46,19 @@ rake gems:install ...@@ -46,15 +46,19 @@ rake gems:install
#### Run your migrations for the desired models #### Run your migrations for the desired models
Run:
```shell
rails generate migration AddDeletedAtToClients deleted_at:datetime
```
and now you have a migration
```ruby ```ruby
class AddDeletedAtToClient < ActiveRecord::Migration class AddDeletedAtToClients < ActiveRecord::Migration
def self.up def change
add_column :clients, :deleted_at, :datetime add_column :clients, :deleted_at, :datetime
end end
def self.down
remove_column :clients, :deleted_at
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