declare_schema 1.3.1.colin.1 → 1.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d5e780d92cb93c57b69a6c7641f7dd20fc52114b0b25a2e47ad662039457290
|
4
|
+
data.tar.gz: a976df026f62e9a0512d71957898bddd077aa2ab8a63d63ddb8c114211df7060
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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] -
|
7
|
+
## [1.3.1] - 2023-10-12
|
8
8
|
### Fixed
|
9
|
-
- Fix bug in default index
|
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
@@ -66,7 +66,7 @@ module DeclareSchema
|
|
66
66
|
break index_name
|
67
67
|
end
|
68
68
|
end or raise IndexNameTooLongError,
|
69
|
-
"
|
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
|
@@ -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
|
-
/
|
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
|
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
|
+
date: 2023-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|