declare_schema 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e1d3c68c4e9b2f6ce739eba37ed19c5f80204495a50a9240e9f1f68a09777e3
4
- data.tar.gz: 63e0a3205c82c2b5e6dacbfbfd10e9aa2e63eee5898d11fd5c102618e73755aa
3
+ metadata.gz: bf6d8bf1670910eeadc3f7ed08860af6630f1b5edc271a0740fe8bb94e7f5c71
4
+ data.tar.gz: 4d058e02cb6b269f6b66fa20f8ac661ecdb7f8b31547cf43e65e27c869221902
5
5
  SHA512:
6
- metadata.gz: 34ab74d97dd53c426d3a289b622670a42846d84279c2e3967ad0663c8f4871b1470a90b309237b09b09724a7e7c2405fb0f614a00d33902f8000bb1df23459ef
7
- data.tar.gz: 2bf6ca852f71807e362ef26b4ba14d75b8a452a6245094eb8023fa1889b94d6584cf15856962f9fb85168208e0de4dd23a7942fb18cdcc5335f7c744382ba826
6
+ metadata.gz: d95d741db5f9279cfe39f7bd972581708a0ccae7e2d9d209318282a9980d2980e3611592ba08b6b53136e23b92ac4aaa51e2a66187002de04bf818c29715820f
7
+ data.tar.gz: 93c203bb2ff2255f014d76a3069d1530d97f9603293738844e2faf6f2c9cb6fb95dcc2aa9ad505df15c8e1e14567e076a5e2901b7b4847f804ce3dd85dc5b313
@@ -4,6 +4,10 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
5
  Note: this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.4.2] - 2020-12-05
8
+ ### Fixed
9
+ - Generalize the fix below to sqlite || Rails 4.
10
+
7
11
  ## [0.4.1] - 2020-12-04
8
12
  ### Fixed
9
13
  - Fixed a bug detecting compound primary keys in Rails 4.
@@ -64,6 +68,7 @@ using the appropriate Rails configuration attributes.
64
68
  ### Added
65
69
  - Initial version from https://github.com/Invoca/hobo_fields v4.1.0.
66
70
 
71
+ [0.4.2]: https://github.com/Invoca/declare_schema/compare/v0.4.1...v0.4.2
67
72
  [0.4.1]: https://github.com/Invoca/declare_schema/compare/v0.4.0...v0.4.1
68
73
  [0.4.0]: https://github.com/Invoca/declare_schema/compare/v0.3.1...v0.4.0
69
74
  [0.3.1]: https://github.com/Invoca/declare_schema/compare/v0.3.0...v0.3.1
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- declare_schema (0.4.1)
4
+ declare_schema (0.4.2)
5
5
  rails (>= 4.2)
6
6
 
7
7
  GEM
@@ -62,9 +62,9 @@ module DeclareSchema
62
62
 
63
63
  private
64
64
 
65
- # This is the old approach which is still needed for SQLite
65
+ # This is the old approach which is still needed for MySQL in Rails 4 and SQLite
66
66
  def sqlite_compound_primary_key(model, table)
67
- ActiveRecord::Base.connection.class.name.match?(/SQLite3Adapter/) or return nil
67
+ ActiveRecord::Base.connection.class.name.match?(/SQLite3Adapter/) || Rails::VERSION::MAJOR < 5 or return nil
68
68
 
69
69
  connection = model.connection.dup
70
70
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeclareSchema
4
- VERSION = "0.4.1"
4
+ VERSION = "0.4.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: declare_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Invoca Development adapted from hobo_fields by Tom Locke