ridgepole 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -1
- data/CHANGELOG.md +7 -0
- data/README.md +9 -8
- data/{docker-compose.yml → compose.yml} +4 -10
- data/lib/ridgepole/cli/config.rb +1 -1
- data/lib/ridgepole/dsl_parser/table_definition.rb +4 -2
- data/lib/ridgepole/dsl_parser.rb +3 -3
- data/lib/ridgepole/version.rb +1 -1
- data/lib/ridgepole.rb +1 -1
- data/ridgepole.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f90fd48ae734b53cd516ac3006e2a3d0b2582c1ed3a2ed1eacccc8884a382bf0
|
4
|
+
data.tar.gz: 926c56a91a6e58a64fbbb46f44ca640983a9285e509ec5b3295aaa5b7d2317c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d00a0d85d16b360912b06da4b26185cea444dc7de4f96cb388881f5859e8592852c3c2fba6797e68436aa4ee000bfd705e0edaea76fafb7333c1b9d81d38001b
|
7
|
+
data.tar.gz: b2a4beae21348b43a401af11448d922dbb1e40c8149ea0d7369d4bc4ff14fc10a6f468e1c2d660ad7fd31731d9661feca62c3a04165f8a9fd098c69b872a285d
|
data/.rubocop.yml
CHANGED
@@ -3,8 +3,9 @@ AllCops:
|
|
3
3
|
- "gemfiles/**/*"
|
4
4
|
- "omnibus-ridgepole/**/*"
|
5
5
|
- "vendor/bundle/**/*"
|
6
|
-
TargetRubyVersion: 2.
|
6
|
+
TargetRubyVersion: 2.7
|
7
7
|
NewCops: enable
|
8
|
+
SuggestExtensions: false
|
8
9
|
Bundler/OrderedGems:
|
9
10
|
Include:
|
10
11
|
- "Appraisals"
|
@@ -53,3 +54,5 @@ Lint/DuplicateBranch:
|
|
53
54
|
Enabled: false
|
54
55
|
Style/OptionalBooleanParameter:
|
55
56
|
Enabled: false
|
57
|
+
Gemspec/DevelopmentDependencies:
|
58
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
## 1.2
|
4
4
|
|
5
|
+
### 1.2.1 (2023/07/29)
|
6
|
+
|
7
|
+
* Support `create_enum` [pull#405](https://github.com/ridgepole/ridgepole/pull/405)
|
8
|
+
* Fix timestamps with index behavior [pull#428](https://github.com/ridgepole/ridgepole/pull/428)
|
9
|
+
* Fix broken `DEFAULT CURRENT_TIMESTAMP` spec [pull#420](https://github.com/ridgepole/ridgepole/pull/420)
|
10
|
+
* Add Ruby 3.2 to CI matrix [pull#419](https://github.com/ridgepole/ridgepole/pull/419)
|
11
|
+
|
5
12
|
### 1.2.0 (2022/09/24)
|
6
13
|
|
7
14
|
* Updated supported column types [pull#399](https://github.com/ridgepole/ridgepole/pull/399) [pull#400](https://github.com/ridgepole/ridgepole/pull/400)
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@ Ridgepole is a tool to manage DB schema.
|
|
5
5
|
It defines DB schema using [Rails DSL](http://guides.rubyonrails.org/migrations.html#types-of-schema-dumps), and updates DB schema according to DSL.
|
6
6
|
(like Chef/Puppet)
|
7
7
|
|
8
|
-
[![Gem Version](https://badge.fury.io/rb/ridgepole.svg)](
|
8
|
+
[![Gem Version](https://badge.fury.io/rb/ridgepole.svg)](https://badge.fury.io/rb/ridgepole)
|
9
9
|
[![Build Status](https://github.com/ridgepole/ridgepole/workflows/test/badge.svg?branch=1.2)](https://github.com/ridgepole/ridgepole/actions)
|
10
10
|
[![Coverage Status](https://coveralls.io/repos/github/ridgepole/ridgepole/badge.svg?branch=1.2)](https://coveralls.io/github/ridgepole/ridgepole?branch=1.2)
|
11
11
|
|
@@ -13,8 +13,9 @@ It defines DB schema using [Rails DSL](http://guides.rubyonrails.org/migrations.
|
|
13
13
|
|
14
14
|
* Drop support ActiveRecord 5.x in ridgepole v1.2.0.
|
15
15
|
* Partitioning is no longer supported in ridgepole v1.1.0.
|
16
|
-
* ActiveRecord 7.x has some incompatible changes. If you get unintended differences in `datetime
|
17
|
-
* cf. https://github.com/ridgepole/ridgepole/issues/381
|
16
|
+
* ActiveRecord 7.x has some incompatible changes. If you get unintended differences in `datetime` columns consider changing `precision`:
|
17
|
+
* Add `precision: nil` for columns that previously had no `precision` specified (cf. https://github.com/ridgepole/ridgepole/issues/381)
|
18
|
+
* Remove `precision: 6` from columns that previously had `precision: 6` specified explicitly (cf. https://github.com/ridgepole/ridgepole/issues/406)
|
18
19
|
* For ActiveRecord 7.x series, please use AcriveRecord 7.0.2 or higher / Ridgepole 1.0.3 or higher.
|
19
20
|
* cf. https://github.com/ridgepole/ridgepole/pull/380
|
20
21
|
* ActiveRecord 6.1 is supported in ridgepole v0.9, but the ActiveRecord dump has been changed, so there is a difference between ActiveRecord 5.x/6.0 format.
|
@@ -324,12 +325,12 @@ Apply `Schemafile`
|
|
324
325
|
|
325
326
|
|
326
327
|
```sh
|
327
|
-
docker
|
328
|
+
docker compose up -d
|
328
329
|
bundle install
|
329
330
|
bundle exec appraisal install
|
330
331
|
bundle exec appraisal activerecord-7.0 rake
|
331
332
|
# POSTGRESQL=1 bundle exec appraisal activerecord-7.0 rake
|
332
|
-
#
|
333
|
+
# MYSQL80=1 bundle exec appraisal activerecord-7.0 rake
|
333
334
|
```
|
334
335
|
|
335
336
|
**Notice:** Ruby 2.6 or above/mysql-client/postgresql-client is required.
|
@@ -341,6 +342,6 @@ bundle exec appraisal activerecord-7.0 rake
|
|
341
342
|
|
342
343
|
## Example project
|
343
344
|
|
344
|
-
* https://github.com/
|
345
|
-
* https://github.com/
|
346
|
-
* https://github.com/
|
345
|
+
* https://github.com/winebarrel/ridgepole-example
|
346
|
+
* https://github.com/winebarrel/ridgepole-example/pull/1
|
347
|
+
* https://github.com/winebarrel/ridgepole-example/pull/2
|
@@ -1,19 +1,13 @@
|
|
1
|
-
version: "3.8"
|
2
1
|
services:
|
3
|
-
mysql:
|
4
|
-
image: "mysql:5.6.51"
|
5
|
-
ports:
|
6
|
-
- "13316:3306"
|
7
|
-
environment:
|
8
|
-
MYSQL_ROOT_PASSWORD: password
|
9
2
|
mysql57:
|
10
|
-
image: "mysql:5.7
|
3
|
+
image: "mysql:5.7"
|
4
|
+
platform: linux/amd64
|
11
5
|
ports:
|
12
|
-
- "
|
6
|
+
- "13316:3306"
|
13
7
|
environment:
|
14
8
|
MYSQL_ROOT_PASSWORD: password
|
15
9
|
mysql80:
|
16
|
-
image: "mysql:8.0
|
10
|
+
image: "mysql:8.0"
|
17
11
|
ports:
|
18
12
|
- "13318:3306"
|
19
13
|
environment:
|
data/lib/ridgepole/cli/config.rb
CHANGED
@@ -87,6 +87,8 @@ module Ridgepole
|
|
87
87
|
|
88
88
|
# https://github.com/ridgepole/ridgepole/issues/394
|
89
89
|
timestamptz: {},
|
90
|
+
|
91
|
+
enum: {},
|
90
92
|
}.freeze
|
91
93
|
|
92
94
|
TYPES.each do |column_type, default_options|
|
@@ -143,8 +145,8 @@ module Ridgepole
|
|
143
145
|
|
144
146
|
def timestamps(*args)
|
145
147
|
options = { null: false }.merge(args.extract_options!)
|
146
|
-
column(:created_at, :datetime, options)
|
147
|
-
column(:updated_at, :datetime, options)
|
148
|
+
column(:created_at, :datetime, options.dup)
|
149
|
+
column(:updated_at, :datetime, options.dup)
|
148
150
|
end
|
149
151
|
|
150
152
|
def references(*args)
|
data/lib/ridgepole/dsl_parser.rb
CHANGED
@@ -40,9 +40,9 @@ module Ridgepole
|
|
40
40
|
# NOTE: For composite primary keys, the first column of the primary key is used as the foreign key index
|
41
41
|
next if Array(attrs[:options][:primary_key]).first == fk_index
|
42
42
|
|
43
|
-
raise("The column `#{fk_index}` of the table `#{table_name}` has a foreign key but no index." \
|
44
|
-
'
|
45
|
-
'
|
43
|
+
raise("The column `#{fk_index}` of the table `#{table_name}` has a foreign key but no index. " \
|
44
|
+
'Although InnoDB creates an index automatically, ' \
|
45
|
+
'please add one explicitly in order for ridgepole to manage it.')
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
data/lib/ridgepole/version.rb
CHANGED
data/lib/ridgepole.rb
CHANGED
data/ridgepole.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ['lib']
|
24
24
|
|
25
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.
|
25
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.7')
|
26
26
|
|
27
27
|
spec.add_dependency 'activerecord', '>= 5.1', '< 7.1'
|
28
28
|
spec.add_dependency 'diffy'
|
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
spec.add_development_dependency 'rspec', '>= 3.0.0'
|
39
39
|
spec.add_development_dependency 'rspec-match_fuzzy', '>= 0.1.3'
|
40
40
|
spec.add_development_dependency 'rspec-match_ruby', '>= 0.1.3'
|
41
|
-
spec.add_development_dependency 'rubocop', '1.
|
41
|
+
spec.add_development_dependency 'rubocop', '1.54.2'
|
42
42
|
spec.add_development_dependency 'rubocop-rake', '>= 0.5.1'
|
43
43
|
spec.add_development_dependency 'rubocop-rspec', '>= 2.1.0'
|
44
44
|
spec.add_development_dependency 'simplecov'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ridgepole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genki Sugawara
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -204,14 +204,14 @@ dependencies:
|
|
204
204
|
requirements:
|
205
205
|
- - '='
|
206
206
|
- !ruby/object:Gem::Version
|
207
|
-
version: 1.
|
207
|
+
version: 1.54.2
|
208
208
|
type: :development
|
209
209
|
prerelease: false
|
210
210
|
version_requirements: !ruby/object:Gem::Requirement
|
211
211
|
requirements:
|
212
212
|
- - '='
|
213
213
|
- !ruby/object:Gem::Version
|
214
|
-
version: 1.
|
214
|
+
version: 1.54.2
|
215
215
|
- !ruby/object:Gem::Dependency
|
216
216
|
name: rubocop-rake
|
217
217
|
requirement: !ruby/object:Gem::Requirement
|
@@ -287,7 +287,7 @@ files:
|
|
287
287
|
- README.md
|
288
288
|
- Rakefile
|
289
289
|
- bin/ridgepole
|
290
|
-
-
|
290
|
+
- compose.yml
|
291
291
|
- gemfiles/activerecord_6.0.gemfile
|
292
292
|
- gemfiles/activerecord_6.1.gemfile
|
293
293
|
- gemfiles/activerecord_7.0.gemfile
|
@@ -327,7 +327,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
327
327
|
requirements:
|
328
328
|
- - ">="
|
329
329
|
- !ruby/object:Gem::Version
|
330
|
-
version: 2.
|
330
|
+
version: '2.7'
|
331
331
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
332
332
|
requirements:
|
333
333
|
- - ">="
|