schema_plus_foreign_keys 0.1.8 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/prs.yml +134 -0
- data/.gitignore +1 -0
- data/.simplecov +20 -0
- data/Gemfile +4 -1
- data/README.md +25 -18
- data/Rakefile +3 -1
- data/gemfiles/Gemfile.base +1 -1
- data/gemfiles/activerecord-5.2/Gemfile.base +2 -1
- data/gemfiles/activerecord-5.2/Gemfile.mysql2 +2 -2
- data/gemfiles/activerecord-5.2/Gemfile.postgresql +2 -2
- data/gemfiles/activerecord-5.2/Gemfile.sqlite3 +3 -3
- data/gemfiles/activerecord-6.0/Gemfile.base +4 -0
- data/gemfiles/activerecord-6.0/Gemfile.mysql2 +10 -0
- data/gemfiles/activerecord-6.0/Gemfile.postgresql +10 -0
- data/gemfiles/{activerecord-4.2.0 → activerecord-6.0}/Gemfile.sqlite3 +3 -3
- data/lib/schema_plus/foreign_keys/active_record/base.rb +2 -0
- data/lib/schema_plus/foreign_keys/active_record/connection_adapters/abstract/schema_creation.rb +2 -11
- data/lib/schema_plus/foreign_keys/active_record/connection_adapters/abstract_adapter.rb +7 -47
- data/lib/schema_plus/foreign_keys/active_record/connection_adapters/foreign_key_definition.rb +4 -35
- data/lib/schema_plus/foreign_keys/active_record/connection_adapters/mysql2_adapter.rb +15 -16
- data/lib/schema_plus/foreign_keys/active_record/connection_adapters/postgresql_adapter.rb +8 -6
- data/lib/schema_plus/foreign_keys/active_record/connection_adapters/sqlite3_adapter.rb +8 -6
- data/lib/schema_plus/foreign_keys/active_record/connection_adapters/table_definition.rb +7 -46
- data/lib/schema_plus/foreign_keys/active_record/migration/command_recorder.rb +4 -2
- data/lib/schema_plus/foreign_keys/middleware/dumper.rb +4 -2
- data/lib/schema_plus/foreign_keys/middleware/migration.rb +13 -5
- data/lib/schema_plus/foreign_keys/middleware/model.rb +2 -0
- data/lib/schema_plus/foreign_keys/middleware/mysql.rb +3 -1
- data/lib/schema_plus/foreign_keys/middleware/sql.rb +2 -16
- data/lib/schema_plus/foreign_keys/version.rb +3 -1
- data/lib/schema_plus/foreign_keys.rb +2 -1
- data/lib/schema_plus_foreign_keys.rb +2 -0
- data/schema_dev.yml +4 -6
- data/schema_plus_foreign_keys.gemspec +10 -9
- data/spec/deprecation_spec.rb +11 -110
- data/spec/foreign_key_definition_spec.rb +5 -3
- data/spec/foreign_key_spec.rb +22 -20
- data/spec/migration_spec.rb +35 -59
- data/spec/named_schemas_spec.rb +16 -14
- data/spec/schema_dumper_spec.rb +13 -13
- data/spec/spec_helper.rb +4 -2
- data/spec/support/reference.rb +3 -2
- metadata +31 -89
- data/.travis.yml +0 -33
- data/gemfiles/activerecord-4.2.0/Gemfile.base +0 -3
- data/gemfiles/activerecord-4.2.0/Gemfile.mysql2 +0 -10
- data/gemfiles/activerecord-4.2.0/Gemfile.postgresql +0 -10
- data/gemfiles/activerecord-4.2.1/Gemfile.base +0 -3
- data/gemfiles/activerecord-4.2.1/Gemfile.mysql2 +0 -10
- data/gemfiles/activerecord-4.2.1/Gemfile.postgresql +0 -10
- data/gemfiles/activerecord-4.2.1/Gemfile.sqlite3 +0 -10
- data/gemfiles/activerecord-4.2.6/Gemfile.base +0 -3
- data/gemfiles/activerecord-4.2.6/Gemfile.mysql2 +0 -10
- data/gemfiles/activerecord-4.2.6/Gemfile.postgresql +0 -10
- data/gemfiles/activerecord-4.2.6/Gemfile.sqlite3 +0 -10
- data/gemfiles/activerecord-5.0/Gemfile.base +0 -3
- data/gemfiles/activerecord-5.0/Gemfile.mysql2 +0 -10
- data/gemfiles/activerecord-5.0/Gemfile.postgresql +0 -10
- data/gemfiles/activerecord-5.0/Gemfile.sqlite3 +0 -10
- data/gemfiles/activerecord-5.1/Gemfile.base +0 -3
- data/gemfiles/activerecord-5.1/Gemfile.mysql2 +0 -10
- data/gemfiles/activerecord-5.1/Gemfile.postgresql +0 -10
- data/gemfiles/activerecord-5.1/Gemfile.sqlite3 +0 -10
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema_plus_foreign_keys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ronen barzel
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,48 +16,48 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.2'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '6.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '5.2'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '6.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: schema_plus_core
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "
|
37
|
+
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
39
|
+
version: 3.0.0
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
|
-
- - "
|
44
|
+
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: 3.0.0
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: schema_plus_compatibility
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: 1.0.0
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
60
|
+
version: 1.0.0
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: valuable
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,48 +72,34 @@ dependencies:
|
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: its-it
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '1.2'
|
82
|
-
type: :runtime
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - "~>"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '1.2'
|
89
75
|
- !ruby/object:Gem::Dependency
|
90
76
|
name: bundler
|
91
77
|
requirement: !ruby/object:Gem::Requirement
|
92
78
|
requirements:
|
93
|
-
- - "
|
79
|
+
- - ">="
|
94
80
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
81
|
+
version: '0'
|
96
82
|
type: :development
|
97
83
|
prerelease: false
|
98
84
|
version_requirements: !ruby/object:Gem::Requirement
|
99
85
|
requirements:
|
100
|
-
- - "
|
86
|
+
- - ">="
|
101
87
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
88
|
+
version: '0'
|
103
89
|
- !ruby/object:Gem::Dependency
|
104
90
|
name: rake
|
105
91
|
requirement: !ruby/object:Gem::Requirement
|
106
92
|
requirements:
|
107
93
|
- - "~>"
|
108
94
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
95
|
+
version: '13.0'
|
110
96
|
type: :development
|
111
97
|
prerelease: false
|
112
98
|
version_requirements: !ruby/object:Gem::Requirement
|
113
99
|
requirements:
|
114
100
|
- - "~>"
|
115
101
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
102
|
+
version: '13.0'
|
117
103
|
- !ruby/object:Gem::Dependency
|
118
104
|
name: rspec
|
119
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,42 +120,14 @@ dependencies:
|
|
134
120
|
requirements:
|
135
121
|
- - "~>"
|
136
122
|
- !ruby/object:Gem::Version
|
137
|
-
version: '
|
123
|
+
version: '4.1'
|
138
124
|
type: :development
|
139
125
|
prerelease: false
|
140
126
|
version_requirements: !ruby/object:Gem::Requirement
|
141
127
|
requirements:
|
142
128
|
- - "~>"
|
143
129
|
- !ruby/object:Gem::Version
|
144
|
-
version: '
|
145
|
-
- !ruby/object:Gem::Dependency
|
146
|
-
name: simplecov
|
147
|
-
requirement: !ruby/object:Gem::Requirement
|
148
|
-
requirements:
|
149
|
-
- - ">="
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: '0'
|
152
|
-
type: :development
|
153
|
-
prerelease: false
|
154
|
-
version_requirements: !ruby/object:Gem::Requirement
|
155
|
-
requirements:
|
156
|
-
- - ">="
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: '0'
|
159
|
-
- !ruby/object:Gem::Dependency
|
160
|
-
name: simplecov-gem-profile
|
161
|
-
requirement: !ruby/object:Gem::Requirement
|
162
|
-
requirements:
|
163
|
-
- - ">="
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: '0'
|
166
|
-
type: :development
|
167
|
-
prerelease: false
|
168
|
-
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
requirements:
|
170
|
-
- - ">="
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: '0'
|
130
|
+
version: '4.1'
|
173
131
|
description: 'Extended support for foreign key constraints in ActiveRecord, including:
|
174
132
|
definition as column attribute; deferrable; and SQLite3 support; cleaner dumps;
|
175
133
|
and more!'
|
@@ -179,37 +137,22 @@ executables: []
|
|
179
137
|
extensions: []
|
180
138
|
extra_rdoc_files: []
|
181
139
|
files:
|
140
|
+
- ".github/workflows/prs.yml"
|
182
141
|
- ".gitignore"
|
183
|
-
- ".
|
142
|
+
- ".simplecov"
|
184
143
|
- Gemfile
|
185
144
|
- LICENSE.txt
|
186
145
|
- README.md
|
187
146
|
- Rakefile
|
188
147
|
- gemfiles/Gemfile.base
|
189
|
-
- gemfiles/activerecord-4.2.0/Gemfile.base
|
190
|
-
- gemfiles/activerecord-4.2.0/Gemfile.mysql2
|
191
|
-
- gemfiles/activerecord-4.2.0/Gemfile.postgresql
|
192
|
-
- gemfiles/activerecord-4.2.0/Gemfile.sqlite3
|
193
|
-
- gemfiles/activerecord-4.2.1/Gemfile.base
|
194
|
-
- gemfiles/activerecord-4.2.1/Gemfile.mysql2
|
195
|
-
- gemfiles/activerecord-4.2.1/Gemfile.postgresql
|
196
|
-
- gemfiles/activerecord-4.2.1/Gemfile.sqlite3
|
197
|
-
- gemfiles/activerecord-4.2.6/Gemfile.base
|
198
|
-
- gemfiles/activerecord-4.2.6/Gemfile.mysql2
|
199
|
-
- gemfiles/activerecord-4.2.6/Gemfile.postgresql
|
200
|
-
- gemfiles/activerecord-4.2.6/Gemfile.sqlite3
|
201
|
-
- gemfiles/activerecord-5.0/Gemfile.base
|
202
|
-
- gemfiles/activerecord-5.0/Gemfile.mysql2
|
203
|
-
- gemfiles/activerecord-5.0/Gemfile.postgresql
|
204
|
-
- gemfiles/activerecord-5.0/Gemfile.sqlite3
|
205
|
-
- gemfiles/activerecord-5.1/Gemfile.base
|
206
|
-
- gemfiles/activerecord-5.1/Gemfile.mysql2
|
207
|
-
- gemfiles/activerecord-5.1/Gemfile.postgresql
|
208
|
-
- gemfiles/activerecord-5.1/Gemfile.sqlite3
|
209
148
|
- gemfiles/activerecord-5.2/Gemfile.base
|
210
149
|
- gemfiles/activerecord-5.2/Gemfile.mysql2
|
211
150
|
- gemfiles/activerecord-5.2/Gemfile.postgresql
|
212
151
|
- gemfiles/activerecord-5.2/Gemfile.sqlite3
|
152
|
+
- gemfiles/activerecord-6.0/Gemfile.base
|
153
|
+
- gemfiles/activerecord-6.0/Gemfile.mysql2
|
154
|
+
- gemfiles/activerecord-6.0/Gemfile.postgresql
|
155
|
+
- gemfiles/activerecord-6.0/Gemfile.sqlite3
|
213
156
|
- lib/schema_plus/foreign_keys.rb
|
214
157
|
- lib/schema_plus/foreign_keys/active_record/base.rb
|
215
158
|
- lib/schema_plus/foreign_keys/active_record/connection_adapters/abstract/schema_creation.rb
|
@@ -241,7 +184,7 @@ homepage: https://github.com/SchemaPlus/schema_plus_foreign_keys
|
|
241
184
|
licenses:
|
242
185
|
- MIT
|
243
186
|
metadata: {}
|
244
|
-
post_install_message:
|
187
|
+
post_install_message:
|
245
188
|
rdoc_options: []
|
246
189
|
require_paths:
|
247
190
|
- lib
|
@@ -249,16 +192,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
249
192
|
requirements:
|
250
193
|
- - ">="
|
251
194
|
- !ruby/object:Gem::Version
|
252
|
-
version:
|
195
|
+
version: 2.5.0
|
253
196
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
254
197
|
requirements:
|
255
198
|
- - ">="
|
256
199
|
- !ruby/object:Gem::Version
|
257
200
|
version: '0'
|
258
201
|
requirements: []
|
259
|
-
|
260
|
-
|
261
|
-
signing_key:
|
202
|
+
rubygems_version: 3.0.8
|
203
|
+
signing_key:
|
262
204
|
specification_version: 4
|
263
205
|
summary: Extended support for foreign key constraints in ActiveRecord
|
264
206
|
test_files:
|
data/.travis.yml
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
# This file was auto-generated by the schema_dev tool, based on the data in
|
2
|
-
# ./schema_dev.yml
|
3
|
-
# Please do not edit this file; any changes will be overwritten next time
|
4
|
-
# schema_dev gets run.
|
5
|
-
---
|
6
|
-
sudo: false
|
7
|
-
rvm:
|
8
|
-
- 2.3.1
|
9
|
-
gemfile:
|
10
|
-
- gemfiles/activerecord-4.2.0/Gemfile.mysql2
|
11
|
-
- gemfiles/activerecord-4.2.0/Gemfile.postgresql
|
12
|
-
- gemfiles/activerecord-4.2.0/Gemfile.sqlite3
|
13
|
-
- gemfiles/activerecord-4.2.1/Gemfile.mysql2
|
14
|
-
- gemfiles/activerecord-4.2.1/Gemfile.postgresql
|
15
|
-
- gemfiles/activerecord-4.2.1/Gemfile.sqlite3
|
16
|
-
- gemfiles/activerecord-4.2.6/Gemfile.mysql2
|
17
|
-
- gemfiles/activerecord-4.2.6/Gemfile.postgresql
|
18
|
-
- gemfiles/activerecord-4.2.6/Gemfile.sqlite3
|
19
|
-
- gemfiles/activerecord-5.0/Gemfile.mysql2
|
20
|
-
- gemfiles/activerecord-5.0/Gemfile.postgresql
|
21
|
-
- gemfiles/activerecord-5.0/Gemfile.sqlite3
|
22
|
-
- gemfiles/activerecord-5.1/Gemfile.mysql2
|
23
|
-
- gemfiles/activerecord-5.1/Gemfile.postgresql
|
24
|
-
- gemfiles/activerecord-5.1/Gemfile.sqlite3
|
25
|
-
- gemfiles/activerecord-5.2/Gemfile.mysql2
|
26
|
-
- gemfiles/activerecord-5.2/Gemfile.postgresql
|
27
|
-
- gemfiles/activerecord-5.2/Gemfile.sqlite3
|
28
|
-
env: POSTGRESQL_DB_USER=postgres MYSQL_DB_USER=travis
|
29
|
-
addons:
|
30
|
-
postgresql: '9.4'
|
31
|
-
before_script: bundle exec rake create_databases
|
32
|
-
after_script: bundle exec rake drop_databases
|
33
|
-
script: bundle exec rake travis
|