data_migrate 9.1.2 → 9.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +1 -1
  3. data/.gitignore +0 -1
  4. data/Appraisals +5 -5
  5. data/Changelog.md +3 -7
  6. data/Gemfile.lock +148 -0
  7. data/README.md +3 -3
  8. data/data_migrate.gemspec +1 -1
  9. data/gemfiles/rails_6.1.gemfile +1 -1
  10. data/gemfiles/rails_6.1.gemfile.lock +227 -0
  11. data/gemfiles/rails_7.0.gemfile +1 -1
  12. data/gemfiles/rails_7.0.gemfile.lock +229 -0
  13. data/gemfiles/{rails_6.0.gemfile → rails_7.1.gemfile} +1 -1
  14. data/gemfiles/rails_7.1.gemfile.lock +262 -0
  15. data/lib/data_migrate/data_migrator.rb +11 -23
  16. data/lib/data_migrate/data_schema.rb +1 -1
  17. data/lib/data_migrate/data_schema_migration.rb +24 -7
  18. data/lib/data_migrate/database_tasks.rb +6 -16
  19. data/lib/data_migrate/migration_context.rb +11 -8
  20. data/lib/data_migrate/rails_helper.rb +79 -0
  21. data/lib/data_migrate/schema_dumper.rb +1 -1
  22. data/lib/data_migrate/schema_migration.rb +5 -4
  23. data/lib/data_migrate/status_service.rb +3 -3
  24. data/lib/data_migrate/tasks/data_migrate_tasks.rb +3 -3
  25. data/lib/data_migrate/version.rb +1 -1
  26. data/lib/data_migrate.rb +1 -1
  27. data/spec/data_migrate/data_migrator_spec.rb +16 -13
  28. data/spec/data_migrate/data_schema_migration_spec.rb +25 -8
  29. data/spec/data_migrate/data_spec.rb +1 -1
  30. data/spec/data_migrate/database_tasks_spec.rb +34 -18
  31. data/spec/data_migrate/migration_context_spec.rb +15 -8
  32. data/spec/data_migrate/schema_dumper_spec.rb +6 -3
  33. data/spec/data_migrate/schema_migration_spec.rb +13 -6
  34. data/spec/data_migrate/status_service_spec.rb +6 -3
  35. data/spec/data_migrate/tasks/data_migrate_tasks_spec.rb +8 -8
  36. data/spec/db/data/20091231235959_some_name.rb +1 -1
  37. data/spec/db/data/20171231235959_super_update.rb +1 -1
  38. data/spec/db/migrate/20131111111111_late_migration.rb +1 -1
  39. data/spec/db/migrate/20202020202011_db_migration.rb +1 -1
  40. metadata +13 -10
  41. data/lib/data_migrate/legacy_migrator.rb +0 -22
  42. data/spec/data_migrate/legacy_migrator_spec.rb +0 -38
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7fdd9880e5937982737cd3d5c85262db7eeed54aa54f650d0f59425b19f0237c
4
- data.tar.gz: 5421f2f74c1239c4e855ae6590a5448d1c0010476c95b212c64f729075e65156
3
+ metadata.gz: 98382ecfcd0ad635d3e53bb746f4b2a7a402c2b2a78d312e864bbe6f288b65b1
4
+ data.tar.gz: 315d89e1465e7f5a804d4e70d67963949608632b91b7276ea23319f2183789ba
5
5
  SHA512:
6
- metadata.gz: 9317a09e8d0608432a74f4f8bdedf82f2ee208e387aa133ee69753e44ec4777e464ff255b2923e6b74bf58d74db410629167dc3f2179361313e04c41dbbaef03
7
- data.tar.gz: 98a90dbaa4ce0d690cec9b53192f962fea550cf2756564a9d243cb31160d701162ec3b46ccc8dbeecdb69d5ccebeb39573b7a105e5d5704f40afdc1c815885d8
6
+ metadata.gz: '04098142838de3bb59be85adc46a9a4aed734668a154378488c74ea2a1982793a45450364f089edb479add87cab1b47e801916553c01ad003bbe71c0ba06b855'
7
+ data.tar.gz: 4654fdfb138a53c5cc4ff59df1d63bc66ccd0f66d292f79c0d37ccbdb43c184144d5122718e9027ea643f1e0786d79844aee44d70feb5a1c455a59670286e5ef
@@ -15,9 +15,9 @@ jobs:
15
15
  - '3.1'
16
16
  - '3.2'
17
17
  gemfile:
18
- - gemfiles/rails_6.0.gemfile
19
18
  - gemfiles/rails_6.1.gemfile
20
19
  - gemfiles/rails_7.0.gemfile
20
+ - gemfiles/rails_7.1.gemfile
21
21
  runs-on: ubuntu-latest
22
22
  env:
23
23
  BUNDLE_GEMFILE: ${{ matrix.gemfile }}
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.rvmrc
2
2
  *.gem
3
- *.lock
4
3
  gemfiles/.bundle
5
4
  spec/db/test.db
6
5
  spec/db/other_test.db
data/Appraisals CHANGED
@@ -1,11 +1,11 @@
1
- appraise 'rails-6.0' do
2
- gem 'rails', '~> 6.0.0'
3
- end
4
-
5
1
  appraise 'rails-6.1' do
6
2
  gem 'rails', '~> 6.1.0'
7
3
  end
8
4
 
9
5
  appraise 'rails-7.0' do
10
- gem 'rails', '~> 7.0'
6
+ gem 'rails', '~> 7.0.0'
7
+ end
8
+
9
+ appraise 'rails-7.1' do
10
+ gem 'rails', '7.1.0'
11
11
  end
data/Changelog.md CHANGED
@@ -1,12 +1,8 @@
1
1
  # Changelog
2
2
 
3
- ## 9.1.2
4
-
5
- - Fix #281 to maintain rails 6.0 support. (#342)
6
-
7
- ## 9.1.1
8
-
9
- - Backport Fix data:schema:load for structure.sql (#281)
3
+ ## 9.2.0
4
+ - Support Rails 7.1 https://github.com/ilyakatz/data-migrate/pull/278
5
+ - Build and test against 7.1.0.rc1 https://github.com/ilyakatz/data-migrate/pull/286
10
6
 
11
7
  ## 9.1.0
12
8
 
data/Gemfile.lock ADDED
@@ -0,0 +1,148 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ data_migrate (9.2.0)
5
+ activerecord (>= 6.1)
6
+ railties (>= 6.1)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ actionpack (7.0.7.2)
12
+ actionview (= 7.0.7.2)
13
+ activesupport (= 7.0.7.2)
14
+ rack (~> 2.0, >= 2.2.4)
15
+ rack-test (>= 0.6.3)
16
+ rails-dom-testing (~> 2.0)
17
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
18
+ actionview (7.0.7.2)
19
+ activesupport (= 7.0.7.2)
20
+ builder (~> 3.1)
21
+ erubi (~> 1.4)
22
+ rails-dom-testing (~> 2.0)
23
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
24
+ activemodel (7.0.7.2)
25
+ activesupport (= 7.0.7.2)
26
+ activerecord (7.0.7.2)
27
+ activemodel (= 7.0.7.2)
28
+ activesupport (= 7.0.7.2)
29
+ activesupport (7.0.7.2)
30
+ concurrent-ruby (~> 1.0, >= 1.0.2)
31
+ i18n (>= 1.6, < 2)
32
+ minitest (>= 5.1)
33
+ tzinfo (~> 2.0)
34
+ appraisal (2.5.0)
35
+ bundler
36
+ rake
37
+ thor (>= 0.14.0)
38
+ ast (2.4.2)
39
+ builder (3.2.4)
40
+ childprocess (4.1.0)
41
+ coderay (1.1.3)
42
+ concurrent-ruby (1.2.2)
43
+ crass (1.0.6)
44
+ diff-lcs (1.5.0)
45
+ erubi (1.12.0)
46
+ i18n (1.14.1)
47
+ concurrent-ruby (~> 1.0)
48
+ iniparse (1.5.0)
49
+ json (2.6.3)
50
+ language_server-protocol (3.17.0.3)
51
+ loofah (2.21.3)
52
+ crass (~> 1.0.2)
53
+ nokogiri (>= 1.12.0)
54
+ method_source (1.0.0)
55
+ minitest (5.19.0)
56
+ nokogiri (1.15.3-arm64-darwin)
57
+ racc (~> 1.4)
58
+ nokogiri (1.15.3-x86_64-linux)
59
+ racc (~> 1.4)
60
+ overcommit (0.60.0)
61
+ childprocess (>= 0.6.3, < 5)
62
+ iniparse (~> 1.4)
63
+ rexml (~> 3.2)
64
+ parallel (1.23.0)
65
+ parser (3.2.2.3)
66
+ ast (~> 2.4.1)
67
+ racc
68
+ pry (0.14.2)
69
+ coderay (~> 1.1)
70
+ method_source (~> 1.0)
71
+ racc (1.7.1)
72
+ rack (2.2.7)
73
+ rack-test (2.1.0)
74
+ rack (>= 1.3)
75
+ rails-dom-testing (2.1.1)
76
+ activesupport (>= 5.0.0)
77
+ minitest
78
+ nokogiri (>= 1.6)
79
+ rails-html-sanitizer (1.6.0)
80
+ loofah (~> 2.21)
81
+ nokogiri (~> 1.14)
82
+ railties (7.0.7.2)
83
+ actionpack (= 7.0.7.2)
84
+ activesupport (= 7.0.7.2)
85
+ method_source
86
+ rake (>= 12.2)
87
+ thor (~> 1.0)
88
+ zeitwerk (~> 2.5)
89
+ rainbow (3.1.1)
90
+ rake (13.0.6)
91
+ rb-readline (0.5.5)
92
+ regexp_parser (2.8.1)
93
+ rexml (3.2.5)
94
+ rspec (3.12.0)
95
+ rspec-core (~> 3.12.0)
96
+ rspec-expectations (~> 3.12.0)
97
+ rspec-mocks (~> 3.12.0)
98
+ rspec-core (3.12.2)
99
+ rspec-support (~> 3.12.0)
100
+ rspec-expectations (3.12.3)
101
+ diff-lcs (>= 1.2.0, < 2.0)
102
+ rspec-support (~> 3.12.0)
103
+ rspec-mocks (3.12.6)
104
+ diff-lcs (>= 1.2.0, < 2.0)
105
+ rspec-support (~> 3.12.0)
106
+ rspec-support (3.12.1)
107
+ rubocop (1.54.2)
108
+ json (~> 2.3)
109
+ language_server-protocol (>= 3.17.0)
110
+ parallel (~> 1.10)
111
+ parser (>= 3.2.2.3)
112
+ rainbow (>= 2.2.2, < 4.0)
113
+ regexp_parser (>= 1.8, < 3.0)
114
+ rexml (>= 3.2.5, < 4.0)
115
+ rubocop-ast (>= 1.28.0, < 2.0)
116
+ ruby-progressbar (~> 1.7)
117
+ unicode-display_width (>= 2.4.0, < 3.0)
118
+ rubocop-ast (1.29.0)
119
+ parser (>= 3.2.1.0)
120
+ ruby-progressbar (1.13.0)
121
+ sqlite3 (1.6.3-arm64-darwin)
122
+ sqlite3 (1.6.3-x86_64-linux)
123
+ thor (1.2.2)
124
+ timecop (0.9.6)
125
+ tzinfo (2.0.6)
126
+ concurrent-ruby (~> 1.0)
127
+ unicode-display_width (2.4.2)
128
+ zeitwerk (2.6.8)
129
+
130
+ PLATFORMS
131
+ arm64-darwin-22
132
+ x86_64-linux
133
+
134
+ DEPENDENCIES
135
+ appraisal
136
+ data_migrate!
137
+ overcommit
138
+ pry
139
+ rake
140
+ rb-readline
141
+ rspec
142
+ rspec-core
143
+ rubocop
144
+ sqlite3 (~> 1.4)
145
+ timecop
146
+
147
+ BUNDLED WITH
148
+ 2.4.17
data/README.md CHANGED
@@ -36,7 +36,7 @@ table to track all migrations.
36
36
 
37
37
  ## Rails Support
38
38
 
39
- Support Rails 6.0 through 7.0
39
+ Support Rails 6.1 through 7.1
40
40
 
41
41
 
42
42
  #### v1
@@ -92,7 +92,7 @@ You can generate a data migration as you would a schema migration:
92
92
  rake db:version:with_data # Retrieves the current schema version numbers for data and schema migrations
93
93
 
94
94
 
95
- Tasks work as they would with the 'vanilla' db version. The 'with_data' addition to the 'db' tasks will run the task in the context of both the data and schema migrations. That is, rake db:rollback:with_data will check to see if it was a schema or data migration invoked last, and do that. Tasks invoked in that space also have an additional line of output, indicating if the action is performed on data or schema.
95
+ Tasks work as they would with the 'vanilla' db version. The 'with_data' addition to the 'db' tasks will run the task in the context of both the data and schema migrations. That is, rake db:rollback:with_data will check to see if it was a schema or data migration invoked last, and do that. Tasks invoked in that space also have an additional line of output, indicating if the action is performed on data or schema.
96
96
 
97
97
  With 'up' and 'down', you can specify the option 'BOTH', which defaults to false. Using true, will migrate both the data and schema (in the desired direction) if they both match the version provided. Again, going up, schema is given precedence. Down its data.
98
98
 
@@ -164,9 +164,9 @@ Run tests for a specific version of Rails
164
164
 
165
165
  ```
166
166
  bundle exec appraisal install
167
- bundle exec appraisal rails-6.0 rspec
168
167
  bundle exec appraisal rails-6.1 rspec
169
168
  bundle exec appraisal rails-7.0 rspec
169
+ bundle exec appraisal rails-7.1 rspec
170
170
  ```
171
171
 
172
172
  ## Thanks
data/data_migrate.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  activerecord
20
20
  railties
21
21
  ].each do |rails_gem|
22
- s.add_dependency(rails_gem, '>= 6.0')
22
+ s.add_dependency(rails_gem, '>= 6.1')
23
23
  end
24
24
 
25
25
  s.add_development_dependency "appraisal"
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "~> 6.1.0"
6
5
  gem "sqlite3", "~> 1.4"
6
+ gem "rails", "~> 6.1.0"
7
7
 
8
8
  gemspec path: "../"
@@ -0,0 +1,227 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ data_migrate (9.2.0)
5
+ activerecord (>= 6.1)
6
+ railties (>= 6.1)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ actioncable (6.1.7.3)
12
+ actionpack (= 6.1.7.3)
13
+ activesupport (= 6.1.7.3)
14
+ nio4r (~> 2.0)
15
+ websocket-driver (>= 0.6.1)
16
+ actionmailbox (6.1.7.3)
17
+ actionpack (= 6.1.7.3)
18
+ activejob (= 6.1.7.3)
19
+ activerecord (= 6.1.7.3)
20
+ activestorage (= 6.1.7.3)
21
+ activesupport (= 6.1.7.3)
22
+ mail (>= 2.7.1)
23
+ actionmailer (6.1.7.3)
24
+ actionpack (= 6.1.7.3)
25
+ actionview (= 6.1.7.3)
26
+ activejob (= 6.1.7.3)
27
+ activesupport (= 6.1.7.3)
28
+ mail (~> 2.5, >= 2.5.4)
29
+ rails-dom-testing (~> 2.0)
30
+ actionpack (6.1.7.3)
31
+ actionview (= 6.1.7.3)
32
+ activesupport (= 6.1.7.3)
33
+ rack (~> 2.0, >= 2.0.9)
34
+ rack-test (>= 0.6.3)
35
+ rails-dom-testing (~> 2.0)
36
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
+ actiontext (6.1.7.3)
38
+ actionpack (= 6.1.7.3)
39
+ activerecord (= 6.1.7.3)
40
+ activestorage (= 6.1.7.3)
41
+ activesupport (= 6.1.7.3)
42
+ nokogiri (>= 1.8.5)
43
+ actionview (6.1.7.3)
44
+ activesupport (= 6.1.7.3)
45
+ builder (~> 3.1)
46
+ erubi (~> 1.4)
47
+ rails-dom-testing (~> 2.0)
48
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
+ activejob (6.1.7.3)
50
+ activesupport (= 6.1.7.3)
51
+ globalid (>= 0.3.6)
52
+ activemodel (6.1.7.3)
53
+ activesupport (= 6.1.7.3)
54
+ activerecord (6.1.7.3)
55
+ activemodel (= 6.1.7.3)
56
+ activesupport (= 6.1.7.3)
57
+ activestorage (6.1.7.3)
58
+ actionpack (= 6.1.7.3)
59
+ activejob (= 6.1.7.3)
60
+ activerecord (= 6.1.7.3)
61
+ activesupport (= 6.1.7.3)
62
+ marcel (~> 1.0)
63
+ mini_mime (>= 1.1.0)
64
+ activesupport (6.1.7.3)
65
+ concurrent-ruby (~> 1.0, >= 1.0.2)
66
+ i18n (>= 1.6, < 2)
67
+ minitest (>= 5.1)
68
+ tzinfo (~> 2.0)
69
+ zeitwerk (~> 2.3)
70
+ appraisal (2.4.1)
71
+ bundler
72
+ rake
73
+ thor (>= 0.14.0)
74
+ ast (2.4.2)
75
+ builder (3.2.4)
76
+ childprocess (4.1.0)
77
+ coderay (1.1.3)
78
+ concurrent-ruby (1.2.2)
79
+ crass (1.0.6)
80
+ date (3.3.3)
81
+ diff-lcs (1.5.0)
82
+ erubi (1.12.0)
83
+ globalid (1.1.0)
84
+ activesupport (>= 5.0)
85
+ i18n (1.14.1)
86
+ concurrent-ruby (~> 1.0)
87
+ iniparse (1.5.0)
88
+ json (2.6.3)
89
+ loofah (2.21.3)
90
+ crass (~> 1.0.2)
91
+ nokogiri (>= 1.12.0)
92
+ mail (2.8.1)
93
+ mini_mime (>= 0.1.1)
94
+ net-imap
95
+ net-pop
96
+ net-smtp
97
+ marcel (1.0.2)
98
+ method_source (1.0.0)
99
+ mini_mime (1.1.2)
100
+ minitest (5.18.1)
101
+ net-imap (0.3.4)
102
+ date
103
+ net-protocol
104
+ net-pop (0.1.2)
105
+ net-protocol
106
+ net-protocol (0.2.1)
107
+ timeout
108
+ net-smtp (0.3.3)
109
+ net-protocol
110
+ nio4r (2.5.9)
111
+ nokogiri (1.15.2-arm64-darwin)
112
+ racc (~> 1.4)
113
+ nokogiri (1.15.2-x86_64-linux)
114
+ racc (~> 1.4)
115
+ overcommit (0.60.0)
116
+ childprocess (>= 0.6.3, < 5)
117
+ iniparse (~> 1.4)
118
+ rexml (~> 3.2)
119
+ parallel (1.23.0)
120
+ parser (3.2.2.3)
121
+ ast (~> 2.4.1)
122
+ racc
123
+ pry (0.14.2)
124
+ coderay (~> 1.1)
125
+ method_source (~> 1.0)
126
+ racc (1.7.1)
127
+ rack (2.2.7)
128
+ rack-test (2.1.0)
129
+ rack (>= 1.3)
130
+ rails (6.1.7.3)
131
+ actioncable (= 6.1.7.3)
132
+ actionmailbox (= 6.1.7.3)
133
+ actionmailer (= 6.1.7.3)
134
+ actionpack (= 6.1.7.3)
135
+ actiontext (= 6.1.7.3)
136
+ actionview (= 6.1.7.3)
137
+ activejob (= 6.1.7.3)
138
+ activemodel (= 6.1.7.3)
139
+ activerecord (= 6.1.7.3)
140
+ activestorage (= 6.1.7.3)
141
+ activesupport (= 6.1.7.3)
142
+ bundler (>= 1.15.0)
143
+ railties (= 6.1.7.3)
144
+ sprockets-rails (>= 2.0.0)
145
+ rails-dom-testing (2.0.3)
146
+ activesupport (>= 4.2.0)
147
+ nokogiri (>= 1.6)
148
+ rails-html-sanitizer (1.6.0)
149
+ loofah (~> 2.21)
150
+ nokogiri (~> 1.14)
151
+ railties (6.1.7.3)
152
+ actionpack (= 6.1.7.3)
153
+ activesupport (= 6.1.7.3)
154
+ method_source
155
+ rake (>= 12.2)
156
+ thor (~> 1.0)
157
+ rainbow (3.1.1)
158
+ rake (13.0.6)
159
+ rb-readline (0.5.5)
160
+ regexp_parser (2.8.1)
161
+ rexml (3.2.5)
162
+ rspec (3.12.0)
163
+ rspec-core (~> 3.12.0)
164
+ rspec-expectations (~> 3.12.0)
165
+ rspec-mocks (~> 3.12.0)
166
+ rspec-core (3.12.2)
167
+ rspec-support (~> 3.12.0)
168
+ rspec-expectations (3.12.3)
169
+ diff-lcs (>= 1.2.0, < 2.0)
170
+ rspec-support (~> 3.12.0)
171
+ rspec-mocks (3.12.5)
172
+ diff-lcs (>= 1.2.0, < 2.0)
173
+ rspec-support (~> 3.12.0)
174
+ rspec-support (3.12.0)
175
+ rubocop (1.52.1)
176
+ json (~> 2.3)
177
+ parallel (~> 1.10)
178
+ parser (>= 3.2.2.3)
179
+ rainbow (>= 2.2.2, < 4.0)
180
+ regexp_parser (>= 1.8, < 3.0)
181
+ rexml (>= 3.2.5, < 4.0)
182
+ rubocop-ast (>= 1.28.0, < 2.0)
183
+ ruby-progressbar (~> 1.7)
184
+ unicode-display_width (>= 2.4.0, < 3.0)
185
+ rubocop-ast (1.29.0)
186
+ parser (>= 3.2.1.0)
187
+ ruby-progressbar (1.13.0)
188
+ sprockets (4.2.0)
189
+ concurrent-ruby (~> 1.0)
190
+ rack (>= 2.2.4, < 4)
191
+ sprockets-rails (3.4.2)
192
+ actionpack (>= 5.2)
193
+ activesupport (>= 5.2)
194
+ sprockets (>= 3.0.0)
195
+ sqlite3 (1.6.3-arm64-darwin)
196
+ sqlite3 (1.6.3-x86_64-linux)
197
+ thor (1.2.2)
198
+ timecop (0.9.6)
199
+ timeout (0.3.2)
200
+ tzinfo (2.0.6)
201
+ concurrent-ruby (~> 1.0)
202
+ unicode-display_width (2.4.2)
203
+ websocket-driver (0.7.5)
204
+ websocket-extensions (>= 0.1.0)
205
+ websocket-extensions (0.1.5)
206
+ zeitwerk (2.6.8)
207
+
208
+ PLATFORMS
209
+ arm64-darwin-22
210
+ x86_64-linux
211
+
212
+ DEPENDENCIES
213
+ appraisal
214
+ data_migrate!
215
+ overcommit
216
+ pry
217
+ rails (~> 6.1.0)
218
+ rake
219
+ rb-readline
220
+ rspec
221
+ rspec-core
222
+ rubocop
223
+ sqlite3 (~> 1.4)
224
+ timecop
225
+
226
+ BUNDLED WITH
227
+ 2.4.14
@@ -3,6 +3,6 @@
3
3
  source "http://rubygems.org"
4
4
 
5
5
  gem "sqlite3", "~> 1.4"
6
- gem "rails", "~> 7.0.0"
6
+ gem "rails", "~> 7.0"
7
7
 
8
8
  gemspec path: "../"