declare_schema 1.3.1.colin.1 → 1.3.1

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: a0f533d7dc8d88f7a84002c3f683cc4afa1a50af764fb6f478fb6d21f06d3d00
4
- data.tar.gz: a033eb5411618bf7d0e1beb51176aa682a7362820df942df52f9d87818875237
3
+ metadata.gz: 3d5e780d92cb93c57b69a6c7641f7dd20fc52114b0b25a2e47ad662039457290
4
+ data.tar.gz: a976df026f62e9a0512d71957898bddd077aa2ab8a63d63ddb8c114211df7060
5
5
  SHA512:
6
- metadata.gz: eb1c42caab31adbd01450a2c94c7a15d4c535bc1e8b89a50370f95796adad9bc21d297969c463febc77f7ba3f64ccd4a79cb68480bf02baff2f864302f435cd1
7
- data.tar.gz: f2882b79e6eadd987d064e9adb742e5d2adea31c1de9a716fdd5a05a1c6a9e54491b8d5825ef9f310038e430ca2c54af08dad0c389202ff101a659065dc6b942
6
+ metadata.gz: 9845c4bf47ac17b28b4b4b4eb6070cdaf6a66102bee5649af99ad8de8ed8a151eb76e5b49cbf9322997d7b1a62db3c3104eafc497ff7b81d7245825813c9bb48
7
+ data.tar.gz: 15eb4cc2bf1181bf8b2cd7152a203ceb6fc568920f0bf185a52dca4d5f65e1ead26ca29424c448834739b03fde489f74b7efe13ef01d9e643a6d0e4819691d52
data/CHANGELOG.md CHANGED
@@ -4,9 +4,9 @@ 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
- ## [1.3.1] - Unreleased
7
+ ## [1.3.1] - 2023-10-12
8
8
  ### Fixed
9
- - Fix bug in default index anme when table name + __ + column suffix exceeds `DeclareSchema.max_index_and_constraint_name_length`.
9
+ - Fix bug in default index name when table name + __ + column suffix exceeds `DeclareSchema.max_index_and_constraint_name_length`.
10
10
  In this case we truncate the table name and append part of its hash.
11
11
 
12
12
  ## [1.3.0] - 2023-07-10
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- declare_schema (1.3.1.colin.1)
4
+ declare_schema (1.3.1)
5
5
  rails (>= 5.0)
6
6
 
7
7
  GEM
@@ -66,7 +66,7 @@ module DeclareSchema
66
66
  break index_name
67
67
  end
68
68
  end or raise IndexNameTooLongError,
69
- "Index '#{index_name}' exceeds configured limit of #{DeclareSchema.max_index_and_constraint_name_length} characters."
69
+ "Default index name '#{index_name}' exceeds configured limit of #{DeclareSchema.max_index_and_constraint_name_length} characters. Use the `name:` option to give it a shorter name, or adjust DeclareSchema.max_index_and_constraint_name_length if you know your database can accept longer names."
70
70
  end
71
71
 
72
72
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeclareSchema
4
- VERSION = "1.3.1.colin.1"
4
+ VERSION = "1.3.1"
5
5
  end
@@ -156,6 +156,7 @@ RSpec.describe DeclareSchema::Model::IndexDefinition do
156
156
  50 => 'user_domains4814__last_name_first_name_middle_name',
157
157
  51 => 'user_domains_4814__last_name_first_name_middle_name',
158
158
  52 => 'user_domains_extra__last_name_first_name_middle_name',
159
+ 53 => 'user_domains_extra__last_name_first_name_middle_name',
159
160
  }.each do |len, index_name|
160
161
  context "with max_index_and_constraint_name_length of #{len}" do
161
162
  let(:max_index_and_constraint_name_length) { len }
@@ -169,7 +170,7 @@ RSpec.describe DeclareSchema::Model::IndexDefinition do
169
170
 
170
171
  it 'raises' do
171
172
  expect { subject }.to raise_exception(DeclareSchema::Model::IndexDefinition::IndexNameTooLongError,
172
- /Index '__last_name_first_name_middle_name' exceeds configured limit of 33 characters/)
173
+ /Default index name '__last_name_first_name_middle_name' exceeds configured limit of 33 characters\. Use the `name:` option to give it a shorter name, or adjust DeclareSchema\.max_index_and_constraint_name_length/i)
173
174
  end
174
175
  end
175
176
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: declare_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1.colin.1
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Invoca Development adapted from hobo_fields by Tom Locke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-11 00:00:00.000000000 Z
11
+ date: 2023-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails