birdspotting 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +15 -4
- data/birdspotting.gemspec +1 -1
- data/lib/birdspotting/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 969f73b4e3218c8658ecb64ed8c23e4e2ba5456882c8c7ce0b023df273743127
|
4
|
+
data.tar.gz: 9bd02ef303cf885249ffe6d2991fd869f07e3ce69ca7ebf6097230b6bf8ed263
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 169097574d58f765beee12184ed050ae7ebff5ad9105e6e661df4959a45bdd198ef0196dff3bac5c57cdd828a175a85fc44d69a69f7120a89ef9c6a0839a614c
|
7
|
+
data.tar.gz: 985c317f6a1dbc4ecd9458862473e760ae217e1d13bab888283bcce1e2bec7239d5c63ee6d4fbd1a425fa651eea3b022b448e1b129316e4afc7e5cbe2d9f5c31
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
|
4
4
|
Some add-ons on `ActiveRecord::Migration` to make migration safer in the context of zero downtime deployment.
|
5
5
|
|
6
|
+
[![Gem Version](https://badge.fury.io/rb/birdspotting.svg)](https://badge.fury.io/rb/birdspotting)
|
7
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/4a272a3f849869a200df/maintainability)](https://codeclimate.com/github/drivy/birdspotting/maintainability)
|
8
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/4a272a3f849869a200df/test_coverage)](https://codeclimate.com/github/drivy/birdspotting/test_coverage)
|
9
|
+
|
6
10
|
## Installation
|
7
11
|
|
8
12
|
Add this line to your application's Gemfile:
|
@@ -48,7 +52,13 @@ end
|
|
48
52
|
`start_check_at` allows to start the checks after some migration version only. Set it to a migration
|
49
53
|
timestamp like 20151209000000 for instance. When nil, all migrations will be checked.
|
50
54
|
|
51
|
-
`check_bypass_env_var` specify the ENV var allowing to bypass the checks.
|
55
|
+
`check_bypass_env_var` specify the ENV var allowing to bypass the checks. Use it to bypass temporarily all the checks so you do it intentionally. You can set it to any value, it's just testing it's set.
|
56
|
+
|
57
|
+
For instance if check_bypass_env_var is set to BYPASS_SCHEMA_STATEMENTS_CHECK (the default) you can do:
|
58
|
+
|
59
|
+
```
|
60
|
+
BYPASS_SCHEMA_STATEMENTS_CHECK=true rails db:migrate:up VERSION=20180806142044
|
61
|
+
```
|
52
62
|
|
53
63
|
### add_column request position
|
54
64
|
|
@@ -74,7 +84,8 @@ And we want to be able to release and run migration without downtime.
|
|
74
84
|
Though when a rename_column is used, it will raise a `Birdspotting::RenameColumnForbiddenError`.
|
75
85
|
|
76
86
|
You can skip this validation by setting `rename_column_check` to `false`.
|
77
|
-
You can customise the warning message by using the `rename_column_message` setting.
|
87
|
+
You can customise the warning message by using the `rename_column_message` setting.
|
88
|
+
You might like to customize the warning message to be a link to an internal set of instructions for the correct way to do this.
|
78
89
|
|
79
90
|
### remove_column
|
80
91
|
|
@@ -85,11 +96,11 @@ Thus we check if the column is still present in the columns list.
|
|
85
96
|
- If we are not able to find the model, we issue a `Birdspotting::ModelNotFoundError`.
|
86
97
|
- If the column is still present in the model, we issue a `Birdspotting::RemoveColumnForbiddenError`.
|
87
98
|
|
88
|
-
We advise to set the column in the `ignored_columns` of the model.
|
99
|
+
We advise to set the column in the `ignored_columns` of the model. (See [this blog article](https://blog.bigbinary.com/2016/05/24/rails-5-adds-active-record-ignored-columns.html))
|
89
100
|
|
90
101
|
You can skip this validation by setting `remove_column_check` to `false`.
|
91
102
|
|
92
|
-
###
|
103
|
+
### reorder_columns [mySql only]
|
93
104
|
|
94
105
|
As said above, we like to keep or columns organised for the case where
|
95
106
|
we don't use the ORM but some other client.
|
data/birdspotting.gemspec
CHANGED
data/lib/birdspotting/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: birdspotting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Drivy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-09-
|
13
|
+
date: 2018-09-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
name: activerecord
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
|
-
- - "
|
145
|
+
- - "~>"
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '5.0'
|
148
148
|
type: :runtime
|
149
149
|
prerelease: false
|
150
150
|
version_requirements: !ruby/object:Gem::Requirement
|
151
151
|
requirements:
|
152
|
-
- - "
|
152
|
+
- - "~>"
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: '5.0'
|
155
155
|
description:
|