data_migrate 11.1.0 → 11.2.0
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 +4 -4
- data/Changelog.md +7 -0
- data/README.md +4 -12
- data/lib/data_migrate/database_tasks.rb +3 -1
- data/lib/data_migrate/rails_helper.rb +1 -0
- data/lib/data_migrate/version.rb +1 -1
- metadata +2 -51
- data/.github/workflows/build.yml +0 -39
- data/.github/workflows/gempush.yml +0 -28
- data/.gitignore +0 -12
- data/.hound.yml +0 -4
- data/.overcommit.yml +0 -21
- data/.rbenv-gemsets +0 -2
- data/.rspec +0 -3
- data/.rubocop.yml +0 -2
- data/.ruby-style.yml +0 -1061
- data/Appraisals +0 -19
- data/Gemfile +0 -3
- data/Gemfile.lock +0 -192
- data/Rakefile +0 -2
- data/data_migrate.gemspec +0 -41
- data/gemfiles/rails_6.1.gemfile +0 -7
- data/gemfiles/rails_6.1.gemfile.lock +0 -237
- data/gemfiles/rails_7.0.gemfile +0 -7
- data/gemfiles/rails_7.0.gemfile.lock +0 -238
- data/gemfiles/rails_7.1.gemfile +0 -7
- data/gemfiles/rails_7.1.gemfile.lock +0 -277
- data/gemfiles/rails_7.2.gemfile +0 -7
- data/gemfiles/rails_7.2.gemfile.lock +0 -274
- data/gemfiles/rails_8.0.gemfile +0 -7
- data/gemfiles/rails_8.0.gemfile.lock +0 -268
- data/screenshot.png +0 -0
- data/spec/data_migrate/config_spec.rb +0 -69
- data/spec/data_migrate/data_migrator_spec.rb +0 -84
- data/spec/data_migrate/data_schema_migration_spec.rb +0 -33
- data/spec/data_migrate/data_spec.rb +0 -74
- data/spec/data_migrate/database_tasks_spec.rb +0 -214
- data/spec/data_migrate/migration.rb +0 -17
- data/spec/data_migrate/migration_context_spec.rb +0 -117
- data/spec/data_migrate/schema_dumper_spec.rb +0 -36
- data/spec/data_migrate/schema_migration_spec.rb +0 -104
- data/spec/data_migrate/status_service_spec.rb +0 -76
- data/spec/data_migrate/tasks/data_migrate_tasks_spec.rb +0 -129
- data/spec/db/data/20091231235959_some_name.rb +0 -9
- data/spec/db/data/20171231235959_super_update.rb +0 -9
- data/spec/db/data/20181128000207_excluded_file.rb.other_ext +0 -1
- data/spec/db/data/partial_schema/data_schema.rb +0 -1
- data/spec/db/data/partial_schema/test_data_schema.rb +0 -1
- data/spec/db/data/schema/data_schema.rb +0 -1
- data/spec/db/data/schema/test_data_schema.rb +0 -1
- data/spec/db/data_two/20241231235959_data_two_update.rb +0 -9
- data/spec/db/migrate/20131111111111_late_migration.rb +0 -9
- data/spec/db/migrate/20202020202011_db_migration.rb +0 -9
- data/spec/generators/data_migration/data_migration_generator_spec.rb +0 -101
- data/spec/spec_helper.rb +0 -28
- data/tasks/.gitkeep +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 907383933e031d0a1da7bad6dd3a43807794c0abeb27313af27e59ed8d802f3a
|
4
|
+
data.tar.gz: 1ddf826962f7078972ca9a234a723646d7744a41990dbe38550155fc0276fca3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9e79dd56bda8e5f2afecb79f940eb17d7b5439c1d07b38d67943d58fc0ebaf159283d4478ac13925a2ee399097f6825b519052d3fea9f7b04c659a98647e75f
|
7
|
+
data.tar.gz: '0959a1bcf969cbc7834c839eca029d1416ff287ea2927a8ae0493a7880fb6910adea4baf5a2d162bd4cce35f80b610dc2f9d671cf77cf6583a699a96196871de'
|
data/Changelog.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
# 11.2.0
|
4
|
+
|
5
|
+
- Remove committed Gemfile.lock, reduce bundled file list when running `gem install` https://github.com/ilyakatz/data-migrate/pull/351
|
6
|
+
- [Bump actionpack from 7.1.3.4 to 7.1.4.1](https://github.com/ilyakatz/data-migrate/pull/348)
|
7
|
+
- [Bump rexml from 3.3.6 to 3.3.9](https://github.com/ilyakatz/data-migrate/pull/349)
|
8
|
+
- Fix db_config_with_versions arity change and backport https://github.com/ilyakatz/data-migrate/pull/337
|
9
|
+
|
3
10
|
# 11.1.0
|
4
11
|
- Allow multiple data migration paths https://github.com/ilyakatz/data-migrate/pull/331
|
5
12
|
- Fix db:prepare:with_data task on [Rails 7.2](https://github.com/ilyakatz/data-migrate/pull/339)
|
data/README.md
CHANGED
@@ -144,19 +144,12 @@ From now on capistrano will run `rake db:migrate:with_data` in every deploy.
|
|
144
144
|
## Rails Engines support
|
145
145
|
|
146
146
|
This gem also has a initial support for adding data migrations inside Rails engines.
|
147
|
-
|
148
|
-
|
147
|
+
Just add your engines directory pattern to data_migrations initializer, for example
|
148
|
+
in the case your engines are located in `engines` folder you can set it up like this:
|
149
149
|
|
150
150
|
```ruby
|
151
|
-
|
152
|
-
|
153
|
-
initializer :engine_name do |app|
|
154
|
-
::DataMigrate.configure do |data_migrate|
|
155
|
-
default_path = ::DataMigrate::Config.new.data_migrations_path
|
156
|
-
data_migrate.data_migrations_path = [default_path, root.join('db', 'data')]
|
157
|
-
end
|
158
|
-
end
|
159
|
-
end
|
151
|
+
DataMigrate.configure do |config|
|
152
|
+
config.data_migrations_path = ['db/data'] + Dir['engines/**/db/data']
|
160
153
|
end
|
161
154
|
```
|
162
155
|
|
@@ -169,7 +162,6 @@ Then, in the Engine's `db/data` folder, you can add data migrations and run them
|
|
169
162
|
Run tests for a specific version of Rails
|
170
163
|
|
171
164
|
```
|
172
|
-
|
173
165
|
bundle exec appraisal rails-6.1 rspec
|
174
166
|
bundle exec appraisal rails-7.0 rspec
|
175
167
|
bundle exec appraisal rails-7.1 rspec
|
@@ -179,7 +179,9 @@ module DataMigrate
|
|
179
179
|
|
180
180
|
ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
|
181
181
|
|
182
|
-
|
182
|
+
# 7.2 removes the param for db_configs_with_versions in https://github.com/rails/rails/commit/9572fcb4a0bd5396436689a6a42613886871cd81
|
183
|
+
# 7.1 stable backported the change in https://github.com/rails/rails/commit/c53ec4b60980036b43528829d4b0b7457f759224
|
184
|
+
schema_mapped_versions = if Gem::Dependency.new("railties", ">= 7.1.4").match?("railties", Gem.loaded_specs["railties"].version, true)
|
183
185
|
ActiveRecord::Tasks::DatabaseTasks.db_configs_with_versions
|
184
186
|
else
|
185
187
|
db_configs = ActiveRecord::Base.configurations.configs_for(env_name: ActiveRecord::Tasks::DatabaseTasks.env)
|
@@ -6,6 +6,7 @@ module DataMigrate
|
|
6
6
|
|
7
7
|
@equal_to_or_higher_than_7_2 = Gem::Dependency.new("railties", ">= 7.2.0.alpha").match?("railties", Gem.loaded_specs["railties"].version, true)
|
8
8
|
end
|
9
|
+
|
9
10
|
def rails_version_equal_to_or_higher_than_7_1
|
10
11
|
return @equal_to_or_higher_than_7_1 if defined?(@equal_to_or_higher_than_7_1)
|
11
12
|
|
data/lib/data_migrate/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: data_migrate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 11.
|
4
|
+
version: 11.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew J Vargo
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-11-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|
@@ -189,33 +189,9 @@ executables: []
|
|
189
189
|
extensions: []
|
190
190
|
extra_rdoc_files: []
|
191
191
|
files:
|
192
|
-
- ".github/workflows/build.yml"
|
193
|
-
- ".github/workflows/gempush.yml"
|
194
|
-
- ".gitignore"
|
195
|
-
- ".hound.yml"
|
196
|
-
- ".overcommit.yml"
|
197
|
-
- ".rbenv-gemsets"
|
198
|
-
- ".rspec"
|
199
|
-
- ".rubocop.yml"
|
200
|
-
- ".ruby-style.yml"
|
201
|
-
- Appraisals
|
202
192
|
- Changelog.md
|
203
|
-
- Gemfile
|
204
|
-
- Gemfile.lock
|
205
193
|
- LICENSE
|
206
194
|
- README.md
|
207
|
-
- Rakefile
|
208
|
-
- data_migrate.gemspec
|
209
|
-
- gemfiles/rails_6.1.gemfile
|
210
|
-
- gemfiles/rails_6.1.gemfile.lock
|
211
|
-
- gemfiles/rails_7.0.gemfile
|
212
|
-
- gemfiles/rails_7.0.gemfile.lock
|
213
|
-
- gemfiles/rails_7.1.gemfile
|
214
|
-
- gemfiles/rails_7.1.gemfile.lock
|
215
|
-
- gemfiles/rails_7.2.gemfile
|
216
|
-
- gemfiles/rails_7.2.gemfile.lock
|
217
|
-
- gemfiles/rails_8.0.gemfile
|
218
|
-
- gemfiles/rails_8.0.gemfile.lock
|
219
195
|
- lib/capistrano/data_migrate.rb
|
220
196
|
- lib/capistrano/data_migrate/migrate.rb
|
221
197
|
- lib/data_migrate.rb
|
@@ -237,31 +213,6 @@ files:
|
|
237
213
|
- lib/generators/data_migration/data_migration_generator.rb
|
238
214
|
- lib/generators/data_migration/templates/data_migration.rb
|
239
215
|
- lib/generators/data_migration/templates/migration.rb
|
240
|
-
- screenshot.png
|
241
|
-
- spec/data_migrate/config_spec.rb
|
242
|
-
- spec/data_migrate/data_migrator_spec.rb
|
243
|
-
- spec/data_migrate/data_schema_migration_spec.rb
|
244
|
-
- spec/data_migrate/data_spec.rb
|
245
|
-
- spec/data_migrate/database_tasks_spec.rb
|
246
|
-
- spec/data_migrate/migration.rb
|
247
|
-
- spec/data_migrate/migration_context_spec.rb
|
248
|
-
- spec/data_migrate/schema_dumper_spec.rb
|
249
|
-
- spec/data_migrate/schema_migration_spec.rb
|
250
|
-
- spec/data_migrate/status_service_spec.rb
|
251
|
-
- spec/data_migrate/tasks/data_migrate_tasks_spec.rb
|
252
|
-
- spec/db/data/20091231235959_some_name.rb
|
253
|
-
- spec/db/data/20171231235959_super_update.rb
|
254
|
-
- spec/db/data/20181128000207_excluded_file.rb.other_ext
|
255
|
-
- spec/db/data/partial_schema/data_schema.rb
|
256
|
-
- spec/db/data/partial_schema/test_data_schema.rb
|
257
|
-
- spec/db/data/schema/data_schema.rb
|
258
|
-
- spec/db/data/schema/test_data_schema.rb
|
259
|
-
- spec/db/data_two/20241231235959_data_two_update.rb
|
260
|
-
- spec/db/migrate/20131111111111_late_migration.rb
|
261
|
-
- spec/db/migrate/20202020202011_db_migration.rb
|
262
|
-
- spec/generators/data_migration/data_migration_generator_spec.rb
|
263
|
-
- spec/spec_helper.rb
|
264
|
-
- tasks/.gitkeep
|
265
216
|
- tasks/databases.rake
|
266
217
|
homepage: https://github.com/ilyakatz/data-migrate
|
267
218
|
licenses:
|
data/.github/workflows/build.yml
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
name: CI
|
2
|
-
|
3
|
-
on:
|
4
|
-
- push
|
5
|
-
- pull_request
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
test:
|
9
|
-
strategy:
|
10
|
-
fail-fast: false
|
11
|
-
matrix:
|
12
|
-
os: [ "ubuntu-24.04" ]
|
13
|
-
ruby:
|
14
|
-
- '3.1'
|
15
|
-
- '3.2'
|
16
|
-
- '3.3'
|
17
|
-
gemfile:
|
18
|
-
- gemfiles/rails_6.1.gemfile
|
19
|
-
- gemfiles/rails_7.0.gemfile
|
20
|
-
- gemfiles/rails_7.1.gemfile
|
21
|
-
- gemfiles/rails_7.2.gemfile
|
22
|
-
- gemfiles/rails_8.0.gemfile
|
23
|
-
exclude:
|
24
|
-
- ruby: '3.1'
|
25
|
-
gemfile: 'gemfiles/rails_8.0.gemfile'
|
26
|
-
runs-on: ubuntu-latest
|
27
|
-
env:
|
28
|
-
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
29
|
-
RAILS_ENV: test
|
30
|
-
steps:
|
31
|
-
- name: Checkout code
|
32
|
-
uses: actions/checkout@v4
|
33
|
-
- name: Set up Ruby
|
34
|
-
uses: ruby/setup-ruby@v1
|
35
|
-
with:
|
36
|
-
ruby-version: ${{ matrix.ruby }}
|
37
|
-
bundler-cache: true
|
38
|
-
- name: Run tests
|
39
|
-
run: bundle exec rspec
|
@@ -1,28 +0,0 @@
|
|
1
|
-
name: Release Gem
|
2
|
-
|
3
|
-
on:
|
4
|
-
release:
|
5
|
-
types: [released]
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
build:
|
9
|
-
name: Build + Publish
|
10
|
-
runs-on: ubuntu-latest
|
11
|
-
|
12
|
-
steps:
|
13
|
-
- uses: actions/checkout@master
|
14
|
-
- name: Set up Ruby 3.2
|
15
|
-
uses: ruby/setup-ruby@v1
|
16
|
-
with:
|
17
|
-
ruby-version: '3.2'
|
18
|
-
|
19
|
-
- name: Publish to RubyGems
|
20
|
-
run: |
|
21
|
-
mkdir -p $HOME/.gem
|
22
|
-
touch $HOME/.gem/credentials
|
23
|
-
chmod 0600 $HOME/.gem/credentials
|
24
|
-
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
25
|
-
gem build *.gemspec
|
26
|
-
gem push *.gem
|
27
|
-
env:
|
28
|
-
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
|
data/.gitignore
DELETED
data/.hound.yml
DELETED
data/.overcommit.yml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# Use this file to configure the Overcommit hooks you wish to use. This will
|
2
|
-
# extend the default configuration defined in:
|
3
|
-
# https://github.com/brigade/overcommit/blob/master/config/default.yml
|
4
|
-
#
|
5
|
-
# At the topmost level of this YAML file is a key representing type of hook
|
6
|
-
# being run (e.g. pre-commit, commit-msg, etc.). Within each type you can
|
7
|
-
# customize each hook, such as whether to only run it on certain files (via
|
8
|
-
# `include`), whether to only display output if it fails (via `quiet`), etc.
|
9
|
-
#
|
10
|
-
# For a complete list of hooks, see:
|
11
|
-
# https://github.com/brigade/overcommit/tree/master/lib/overcommit/hook
|
12
|
-
#
|
13
|
-
# For a complete list of options that you can use to customize hooks, see:
|
14
|
-
# https://github.com/brigade/overcommit#configuration
|
15
|
-
#
|
16
|
-
# Uncomment the following lines to make the configuration take effect.
|
17
|
-
|
18
|
-
PreCommit:
|
19
|
-
RuboCop:
|
20
|
-
enabled: true
|
21
|
-
on_warn: fail # Treat all warnings as failures
|
data/.rbenv-gemsets
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED