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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 372efa1cc2267462dd7294cf7d39cd710941b223df3d38ec4d24fd7a91feb7ad
4
- data.tar.gz: '0139953c4aee0b08a15e9169af644eca36aa3ecd49d5c7c23a678d7423c35233'
3
+ metadata.gz: '04239dfae50098f46f93b7d09d8fa8ab767372f9b52a58db25902eb88e449e56'
4
+ data.tar.gz: 5a7c529bde98344e6277dc6ab4b915f14c445468c0936998dab0da3376a6b953
5
5
  SHA512:
6
- metadata.gz: b1d8049950bb0a8d38d01479b5a00e6ca9ed80878d2a7b8d21a8217efaf51e7727793d82845c9287c4e18619aa4a36d581b69de47e8ab48f16612ebf9188601c
7
- data.tar.gz: 7b9f3a70ec40ffa42fe8e2928998de861cca4bcbdb23ad3ad9134b4fea09cc0228439b32cb8ec19910d5faf6f331445ba692bca1b8d0a5681d1d77df78554374
6
+ metadata.gz: adc856d7c80a2ecf601efac5170ce365269c6ac474fb33b390f00362e9068c676221b29c065b791d8730dd4c44937b12ab0c13f65b8bd92656a47182dd1cbf2a
7
+ data.tar.gz: 838d682a173a8d69da91702f9373d21d8d769179fc5520b6b2a18ab55f91e2970584022cbdfe1492b8cc5f33e9602f9fd6d445ae4a2b17f4b25d3a629225de45
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.5.1 (2019-12-17)
2
+
3
+ - Fixed migration name in error messages
4
+
1
5
  ## 0.5.0 (2019-12-05)
2
6
 
3
7
  - Added ability to disable checks
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
- - [[+]](#using-change_column_null) using `change_column_null`
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
- ### Using change_column_null
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 (non-Postgres)
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](#using-change_column_null) with this method.
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] = self.class.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
 
@@ -1,3 +1,3 @@
1
1
  module StrongMigrations
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
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.0
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-05 00:00:00.000000000 Z
13
+ date: 2019-12-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord