strong_migrations 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +4 -4
- data/lib/strong_migrations/checker.rb +1 -1
- data/lib/strong_migrations/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '04239dfae50098f46f93b7d09d8fa8ab767372f9b52a58db25902eb88e449e56'
|
4
|
+
data.tar.gz: 5a7c529bde98344e6277dc6ab4b915f14c445468c0936998dab0da3376a6b953
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adc856d7c80a2ecf601efac5170ce365269c6ac474fb33b390f00362e9068c676221b29c065b791d8730dd4c44937b12ab0c13f65b8bd92656a47182dd1cbf2a
|
7
|
+
data.tar.gz: 838d682a173a8d69da91702f9373d21d8d769179fc5520b6b2a18ab55f91e2970584022cbdfe1492b8cc5f33e9602f9fd6d445ae4a2b17f4b25d3a629225de45
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -34,7 +34,7 @@ The following operations can cause downtime or errors:
|
|
34
34
|
- [[+]](#renaming-or-changing-the-type-of-a-column) renaming a column
|
35
35
|
- [[+]](#renaming-a-table) renaming a table
|
36
36
|
- [[+]](#creating-a-table-with-the-force-option) creating a table with the `force` option
|
37
|
-
- [[+]](#
|
37
|
+
- [[+]](#setting-not-null-on-an-existing-column) setting `NOT NULL` on an existing column
|
38
38
|
- [[+]](#adding-a-json-column) adding a `json` column
|
39
39
|
|
40
40
|
Optional checks:
|
@@ -361,7 +361,7 @@ class CreateUsers < ActiveRecord::Migration[6.0]
|
|
361
361
|
end
|
362
362
|
```
|
363
363
|
|
364
|
-
###
|
364
|
+
### Setting `NOT NULL` on an existing column
|
365
365
|
|
366
366
|
#### Bad
|
367
367
|
|
@@ -403,7 +403,7 @@ end
|
|
403
403
|
|
404
404
|
Note: This is not 100% the same as `NOT NULL` column constraint. Here’s a [good explanation](https://medium.com/doctolib/adding-a-not-null-constraint-on-pg-faster-with-minimal-locking-38b2c00c4d1c).
|
405
405
|
|
406
|
-
### Using change_column_null with a default value
|
406
|
+
### Using change_column_null with a default value
|
407
407
|
|
408
408
|
#### Bad
|
409
409
|
|
@@ -429,7 +429,7 @@ class ChangeSomeColumnNull < ActiveRecord::Migration[6.0]
|
|
429
429
|
end
|
430
430
|
```
|
431
431
|
|
432
|
-
Note: In Postgres, `change_column_null` is still [not safe](#
|
432
|
+
Note: In Postgres, `change_column_null` is still [not safe](#setting-not-null-on-an-existing-column) with this method.
|
433
433
|
|
434
434
|
### Adding a json column
|
435
435
|
|
@@ -231,7 +231,7 @@ Then add the NOT NULL constraint."
|
|
231
231
|
|
232
232
|
message = StrongMigrations.error_messages[message_key] || "Missing message"
|
233
233
|
|
234
|
-
vars[:migration_name] =
|
234
|
+
vars[:migration_name] = @migration.class.name
|
235
235
|
vars[:migration_suffix] = "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
236
236
|
vars[:base_model] = "ApplicationRecord"
|
237
237
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: strong_migrations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-12-
|
13
|
+
date: 2019-12-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|