README.md in handcuffs-1.0.2 vs README.md in handcuffs-1.1.0
- old
+ new
@@ -9,22 +9,22 @@
```ruby
# config/initializers/handcuffs.rb
Handcuffs.configure do |config|
- config.phases = [:pre_deploy, :post_deploy]
+ config.phases = [:pre_restart, :post_restart]
end
```
Then call `phase` from inside your migrations
```ruby
# db/migrate/20160318230933_add_on_sale_column.rb
class AddOnSaleColumn < ActiveRecord::Migration
- phase :pre_deploy
+ phase :pre_restart
def up
add_column :products, :on_sale, :boolean
end
@@ -38,11 +38,11 @@
```ruby
# db/migrate/20160318230988_add_on_sale_index
class AddOnSaleIndex < ActiveRecord::Migration
- phase :post_deploy
+ phase :post_restart
def up
add_index :products, :on_sale, algorithm: :concurrently
end
@@ -53,15 +53,15 @@
end
```
You can then run your migrations in phases using
```bash
-rake handcuffs:migrate[pre_deploy]
+rake handcuffs:migrate[pre_restart]
```
or
```bash
-rake handcuffs:migrate[post_deploy]
+rake handcuffs:migrate[post_restart]
```
You can run all migrations using
```bash
rake handcuffs:migrate[all]
@@ -75,11 +75,11 @@
error, you can define a default phase for migrations that don't define one.
```ruby
# config/initializers/handcuffs.rb
Handcuffs.configure do |config|
- config.phases = [:pre_deploy, :post_deploy]
- config.default_phase = :pre_deploy
+ config.phases = [:pre_restart, :post_restart]
+ config.default_phase = :pre_restart
end
```
## Installation