data_migrate 9.4.2 → 11.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +25 -2
- data/README.md +20 -13
- data/lib/data_migrate/data_migrator.rb +1 -1
- data/lib/data_migrate/data_schema.rb +6 -6
- data/lib/data_migrate/database_tasks.rb +58 -21
- data/lib/data_migrate/rails_helper.rb +15 -3
- data/lib/data_migrate/tasks/data_migrate_tasks.rb +8 -6
- data/lib/data_migrate/version.rb +1 -1
- data/lib/generators/data_migration/data_migration_generator.rb +2 -1
- metadata +2 -47
- data/.github/workflows/build.yml +0 -35
- 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 -11
- data/Gemfile +0 -3
- data/Gemfile.lock +0 -184
- 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 -229
- data/gemfiles/rails_7.0.gemfile +0 -7
- data/gemfiles/rails_7.0.gemfile.lock +0 -230
- data/gemfiles/rails_7.1.gemfile +0 -7
- data/gemfiles/rails_7.1.gemfile.lock +0 -263
- data/lib/data_migrate/test.rb +0 -14
- data/screenshot.png +0 -0
- data/spec/data_migrate/config_spec.rb +0 -69
- data/spec/data_migrate/data_migrator_spec.rb +0 -83
- 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 -105
- data/spec/data_migrate/migration.rb +0 -17
- data/spec/data_migrate/migration_context_spec.rb +0 -108
- 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/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,10 +1,33 @@
|
|
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
|
+
|
10
|
+
# 11.1.0
|
11
|
+
- Allow multiple data migration paths https://github.com/ilyakatz/data-migrate/pull/331
|
12
|
+
- Fix db:prepare:with_data task on [Rails 7.2](https://github.com/ilyakatz/data-migrate/pull/339)
|
13
|
+
- Fix ConnectionPool deprecation warnings on [Rails 7.2](https://github.com/ilyakatz/data-migrate/pull/341)
|
14
|
+
- Add Rails 8.0 to testing grounds https://github.com/ilyakatz/data-migrate/pull/341
|
15
|
+
- [Bump webrick from 1.8.1 to 1.8.2](https://github.com/ilyakatz/data-migrate/pull/345)
|
16
|
+
|
17
|
+
# 11.0.0
|
18
|
+
- [Update rexml to 3.3.6](https://github.com/ilyakatz/data-migrate/pull/329)
|
19
|
+
- Fixes a bug which ignored migrations on [Rails 7.1 and higher](https://github.com/ilyakatz/data-migrate/pull/326)
|
20
|
+
|
21
|
+
# 11.0.0rc
|
22
|
+
- Remove Ruby 3.0 from build matrix
|
23
|
+
- Support Rails 7.2.0 https://github.com/ilyakatz/data-migrate/pull/312
|
24
|
+
- Update gemfile.lock builds
|
25
|
+
|
3
26
|
## 9.4.2
|
4
|
-
|
27
|
+
- Fix db:prepare:with_data task
|
5
28
|
|
6
29
|
## 9.4.1
|
7
|
-
|
30
|
+
- Add db:prepare task
|
8
31
|
|
9
32
|
## 9.4.0
|
10
33
|
- Reset model schema cache before each data migration https://github.com/ilyakatz/data-migrate/pull/307
|
data/README.md
CHANGED
@@ -36,8 +36,13 @@ table to track all migrations.
|
|
36
36
|
|
37
37
|
## Rails Support
|
38
38
|
|
39
|
-
Support Rails 6.1 through 7.
|
39
|
+
Support Rails 6.1 through 7.2
|
40
40
|
|
41
|
+
For **Rails 6.0** support, please use gem version `9.1.x`:
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
gem 'data_migrate', '~> 9.1.0'
|
45
|
+
```
|
41
46
|
|
42
47
|
#### v1
|
43
48
|
|
@@ -86,6 +91,7 @@ You can generate a data migration as you would a schema migration:
|
|
86
91
|
rake db:migrate:status:with_data # Display status of data and schema migrations
|
87
92
|
rake db:migrate:up:with_data # Runs the "up" for a given migration VERSION
|
88
93
|
rake db:migrate:with_data # Migrate the database data and schema (options: VERSION=x, VERBOSE=false)
|
94
|
+
rake db:prepare:with_data # Runs setup if database does not exist, or runs data and schema migrations if it does
|
89
95
|
rake db:rollback:with_data # Rolls the schema back to the previous version (specify steps w/ STEP=n)
|
90
96
|
rake db:schema:load:with_data # Load both schema.rb and data_schema.rb file into the database
|
91
97
|
rake db:structure:load:with_data # Load both structure.sql and data_schema.rb file into the database
|
@@ -138,19 +144,12 @@ From now on capistrano will run `rake db:migrate:with_data` in every deploy.
|
|
138
144
|
## Rails Engines support
|
139
145
|
|
140
146
|
This gem also has a initial support for adding data migrations inside Rails engines.
|
141
|
-
|
142
|
-
|
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:
|
143
149
|
|
144
150
|
```ruby
|
145
|
-
|
146
|
-
|
147
|
-
initializer :engine_name do |app|
|
148
|
-
::DataMigrate.configure do |data_migrate|
|
149
|
-
default_path = ::DataMigrate::Config.new.data_migrations_path
|
150
|
-
data_migrate.data_migrations_path = [default_path, root.join('db', 'data')]
|
151
|
-
end
|
152
|
-
end
|
153
|
-
end
|
151
|
+
DataMigrate.configure do |config|
|
152
|
+
config.data_migrations_path = ['db/data'] + Dir['engines/**/db/data']
|
154
153
|
end
|
155
154
|
```
|
156
155
|
|
@@ -163,12 +162,20 @@ Then, in the Engine's `db/data` folder, you can add data migrations and run them
|
|
163
162
|
Run tests for a specific version of Rails
|
164
163
|
|
165
164
|
```
|
166
|
-
bundle exec appraisal install
|
167
165
|
bundle exec appraisal rails-6.1 rspec
|
168
166
|
bundle exec appraisal rails-7.0 rspec
|
169
167
|
bundle exec appraisal rails-7.1 rspec
|
168
|
+
bundle exec appraisal rails-7.2 rspec
|
170
169
|
```
|
171
170
|
|
171
|
+
## Releasing new version
|
172
|
+
|
173
|
+
1. Create a new tag, eg `git tag 9.4.1`
|
174
|
+
1. Go to https://github.com/ilyakatz/data-migrate/tags
|
175
|
+
1. Click "Create release" under 9.4.1
|
176
|
+
1. CLick "Generate release notes"
|
177
|
+
1. Click "Publish release"
|
178
|
+
|
172
179
|
## Thanks
|
173
180
|
|
174
181
|
[Andrew J Vargo](http://github.com/ajvargo) Andrew was the original creator and maintainer of this project!
|
@@ -29,13 +29,13 @@ module DataMigrate
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def versions
|
32
|
-
@versions ||=
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
32
|
+
@versions ||= Set.new.tap do |versions|
|
33
|
+
DataMigrate::DataMigrator.migrations_paths.each do |path|
|
34
|
+
Dir.foreach(path) do |file|
|
35
|
+
match_data = DataMigrate::DataMigrator.match(file)
|
36
|
+
versions << match_data[1].to_i if match_data
|
37
|
+
end
|
37
38
|
end
|
38
|
-
versions
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
@@ -10,21 +10,21 @@ module DataMigrate
|
|
10
10
|
extend self
|
11
11
|
|
12
12
|
# These method are only introduced in Rails 7.1
|
13
|
-
unless respond_to?(:
|
14
|
-
def
|
13
|
+
unless respond_to?(:with_temporary_pool_for_each)
|
14
|
+
def with_temporary_pool_for_each(env: ActiveRecord::Tasks::DatabaseTasks.env, name: nil, &block) # :nodoc:
|
15
15
|
if name
|
16
16
|
db_config = ActiveRecord::Base.configurations.configs_for(env_name: env, name: name)
|
17
|
-
|
17
|
+
with_temporary_pool(db_config, &block)
|
18
18
|
else
|
19
19
|
ActiveRecord::Base.configurations.configs_for(env_name: env, name: name).each do |db_config|
|
20
|
-
|
20
|
+
with_temporary_pool(db_config, &block)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
def with_temporary_connection(db_config) # :nodoc:
|
25
|
+
def with_temporary_connection(db_config, &block) # :nodoc:
|
26
26
|
with_temporary_pool(db_config) do |pool|
|
27
|
-
|
27
|
+
pool.with_connection(&block)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -49,8 +49,8 @@ module DataMigrate
|
|
49
49
|
def db_configs_with_versions
|
50
50
|
db_configs_with_versions = Hash.new { |h, k| h[k] = [] }
|
51
51
|
|
52
|
-
|
53
|
-
db_config =
|
52
|
+
with_temporary_pool_for_each do |pool|
|
53
|
+
db_config = pool.db_config
|
54
54
|
if db_config.primary?
|
55
55
|
versions_to_run = DataMigrate::DatabaseTasks.pending_data_migrations.map { |m| m[:version] }
|
56
56
|
target_version = ActiveRecord::Tasks::DatabaseTasks.target_version
|
@@ -179,9 +179,16 @@ 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)
|
185
|
+
ActiveRecord::Tasks::DatabaseTasks.db_configs_with_versions
|
186
|
+
else
|
187
|
+
db_configs = ActiveRecord::Base.configurations.configs_for(env_name: ActiveRecord::Tasks::DatabaseTasks.env)
|
188
|
+
|
189
|
+
ActiveRecord::Tasks::DatabaseTasks.db_configs_with_versions(db_configs)
|
190
|
+
end
|
183
191
|
|
184
|
-
schema_mapped_versions = ActiveRecord::Tasks::DatabaseTasks.db_configs_with_versions(db_configs)
|
185
192
|
data_mapped_versions = DataMigrate::DatabaseTasks.db_configs_with_versions
|
186
193
|
|
187
194
|
mapped_versions = schema_mapped_versions.merge(data_mapped_versions) do |_key, schema_db_configs, data_db_configs|
|
@@ -209,19 +216,13 @@ module DataMigrate
|
|
209
216
|
seed = false
|
210
217
|
|
211
218
|
each_current_configuration(env) do |db_config|
|
212
|
-
next unless
|
219
|
+
next unless primary?(db_config)
|
213
220
|
|
214
|
-
with_temporary_pool(db_config) do
|
215
|
-
|
216
|
-
database_initialized = migration_connection.schema_migration.table_exists?
|
217
|
-
rescue ActiveRecord::NoDatabaseError
|
221
|
+
with_temporary_pool(db_config) do |pool|
|
222
|
+
unless database_exists?(pool.connection)
|
218
223
|
create(db_config)
|
219
|
-
retry
|
220
|
-
end
|
221
|
-
|
222
|
-
unless database_initialized
|
223
224
|
if File.exist?(schema_dump_path(db_config))
|
224
|
-
load_schema(db_config,
|
225
|
+
load_schema(db_config, schema_format, nil)
|
225
226
|
load_schema_current(
|
226
227
|
:ruby,
|
227
228
|
ENV["DATA_SCHEMA"]
|
@@ -232,7 +233,7 @@ module DataMigrate
|
|
232
233
|
end
|
233
234
|
|
234
235
|
migrate_with_data
|
235
|
-
if
|
236
|
+
if dump_schema_after_migration?
|
236
237
|
dump_schema(db_config)
|
237
238
|
DataMigrate::Tasks::DataMigrateTasks.dump
|
238
239
|
end
|
@@ -241,5 +242,41 @@ module DataMigrate
|
|
241
242
|
|
242
243
|
load_seed if seed
|
243
244
|
end
|
245
|
+
|
246
|
+
private
|
247
|
+
|
248
|
+
def database_exists?(connection)
|
249
|
+
if connection.respond_to?(:database_exists?) # Rails 7.1+
|
250
|
+
connection.database_exists?
|
251
|
+
else
|
252
|
+
connection.table_exists?(ActiveRecord::SchemaMigration.table_name)
|
253
|
+
end
|
254
|
+
rescue ActiveRecord::NoDatabaseError
|
255
|
+
false
|
256
|
+
end
|
257
|
+
|
258
|
+
def primary?(db_config)
|
259
|
+
if db_config.respond_to?(:primary?) # Rails 7.0+
|
260
|
+
db_config.primary?
|
261
|
+
else
|
262
|
+
db_config.name == "primary"
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
def dump_schema_after_migration?
|
267
|
+
if ActiveRecord.respond_to?(:dump_schema_after_migration)
|
268
|
+
ActiveRecord.dump_schema_after_migration
|
269
|
+
else
|
270
|
+
ActiveRecord::Base.dump_schema_after_migration
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
def schema_format
|
275
|
+
if ActiveRecord.respond_to?(:schema_format)
|
276
|
+
ActiveRecord.schema_format
|
277
|
+
else
|
278
|
+
ActiveRecord::Base.schema_format
|
279
|
+
end
|
280
|
+
end
|
244
281
|
end
|
245
282
|
end
|
@@ -1,6 +1,12 @@
|
|
1
1
|
module DataMigrate
|
2
2
|
class RailsHelper
|
3
3
|
class << self
|
4
|
+
def rails_version_equal_to_or_higher_than_7_2
|
5
|
+
return @equal_to_or_higher_than_7_2 if defined?(@equal_to_or_higher_than_7_2)
|
6
|
+
|
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
|
+
end
|
9
|
+
|
4
10
|
def rails_version_equal_to_or_higher_than_7_1
|
5
11
|
return @equal_to_or_higher_than_7_1 if defined?(@equal_to_or_higher_than_7_1)
|
6
12
|
|
@@ -14,7 +20,9 @@ module DataMigrate
|
|
14
20
|
end
|
15
21
|
|
16
22
|
def internal_metadata
|
17
|
-
if
|
23
|
+
if rails_version_equal_to_or_higher_than_7_2
|
24
|
+
ActiveRecord::Base.connection_pool.internal_metadata
|
25
|
+
elsif rails_version_equal_to_or_higher_than_7_1
|
18
26
|
ActiveRecord::Base.connection.internal_metadata
|
19
27
|
else
|
20
28
|
ActiveRecord::InternalMetadata
|
@@ -22,7 +30,9 @@ module DataMigrate
|
|
22
30
|
end
|
23
31
|
|
24
32
|
def schema_migration
|
25
|
-
if
|
33
|
+
if rails_version_equal_to_or_higher_than_7_2
|
34
|
+
ActiveRecord::Base.connection_pool.schema_migration
|
35
|
+
elsif rails_version_equal_to_or_higher_than_7_1
|
26
36
|
ActiveRecord::Base.connection.schema_migration
|
27
37
|
else
|
28
38
|
ActiveRecord::SchemaMigration
|
@@ -54,7 +64,9 @@ module DataMigrate
|
|
54
64
|
end
|
55
65
|
|
56
66
|
def data_schema_migration
|
57
|
-
if
|
67
|
+
if rails_version_equal_to_or_higher_than_7_2
|
68
|
+
DataMigrate::DataSchemaMigration.new(ActiveRecord::Tasks::DatabaseTasks.migration_connection_pool)
|
69
|
+
elsif rails_version_equal_to_or_higher_than_7_1
|
58
70
|
DataMigrate::DataSchemaMigration.new(ActiveRecord::Tasks::DatabaseTasks.migration_connection)
|
59
71
|
else
|
60
72
|
DataMigrate::DataSchemaMigration
|
@@ -6,7 +6,7 @@ module DataMigrate
|
|
6
6
|
extend self
|
7
7
|
|
8
8
|
def migrations_paths
|
9
|
-
@migrations_paths ||= DataMigrate.config.data_migrations_path
|
9
|
+
@migrations_paths ||= Array.wrap(DataMigrate.config.data_migrations_path)
|
10
10
|
end
|
11
11
|
|
12
12
|
def dump
|
@@ -55,11 +55,13 @@ module DataMigrate
|
|
55
55
|
db_list_schema = DataMigrate::RailsHelper.schema_migration_versions
|
56
56
|
file_list = []
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
58
|
+
migrations_paths.each do |path|
|
59
|
+
Dir.foreach(File.join(Rails.root, path)) do |file|
|
60
|
+
# only files matching "20091231235959_some_name.rb" pattern
|
61
|
+
if match_data = /(\d{14})_(.+)\.rb/.match(file)
|
62
|
+
status = db_list_data.delete(match_data[1]) ? 'up' : 'down'
|
63
|
+
file_list << [status, match_data[1], match_data[2], 'data']
|
64
|
+
end
|
63
65
|
end
|
64
66
|
end
|
65
67
|
|
data/lib/data_migrate/version.rb
CHANGED
@@ -38,8 +38,9 @@ module DataMigrate
|
|
38
38
|
File.join(data_migrations_path, "#{file_name}.rb")
|
39
39
|
end
|
40
40
|
|
41
|
+
# Use the first path in the data_migrations_path as the target directory
|
41
42
|
def data_migrations_path
|
42
|
-
DataMigrate.config.data_migrations_path
|
43
|
+
Array.wrap(DataMigrate.config.data_migrations_path).first
|
43
44
|
end
|
44
45
|
end
|
45
46
|
end
|
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:
|
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,29 +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
195
|
- lib/capistrano/data_migrate.rb
|
216
196
|
- lib/capistrano/data_migrate/migrate.rb
|
217
197
|
- lib/data_migrate.rb
|
@@ -228,36 +208,11 @@ files:
|
|
228
208
|
- lib/data_migrate/schema_migration.rb
|
229
209
|
- lib/data_migrate/status_service.rb
|
230
210
|
- lib/data_migrate/tasks/data_migrate_tasks.rb
|
231
|
-
- lib/data_migrate/test.rb
|
232
211
|
- lib/data_migrate/version.rb
|
233
212
|
- lib/generators/data_migrate.rb
|
234
213
|
- lib/generators/data_migration/data_migration_generator.rb
|
235
214
|
- lib/generators/data_migration/templates/data_migration.rb
|
236
215
|
- lib/generators/data_migration/templates/migration.rb
|
237
|
-
- screenshot.png
|
238
|
-
- spec/data_migrate/config_spec.rb
|
239
|
-
- spec/data_migrate/data_migrator_spec.rb
|
240
|
-
- spec/data_migrate/data_schema_migration_spec.rb
|
241
|
-
- spec/data_migrate/data_spec.rb
|
242
|
-
- spec/data_migrate/database_tasks_spec.rb
|
243
|
-
- spec/data_migrate/migration.rb
|
244
|
-
- spec/data_migrate/migration_context_spec.rb
|
245
|
-
- spec/data_migrate/schema_dumper_spec.rb
|
246
|
-
- spec/data_migrate/schema_migration_spec.rb
|
247
|
-
- spec/data_migrate/status_service_spec.rb
|
248
|
-
- spec/data_migrate/tasks/data_migrate_tasks_spec.rb
|
249
|
-
- spec/db/data/20091231235959_some_name.rb
|
250
|
-
- spec/db/data/20171231235959_super_update.rb
|
251
|
-
- spec/db/data/20181128000207_excluded_file.rb.other_ext
|
252
|
-
- spec/db/data/partial_schema/data_schema.rb
|
253
|
-
- spec/db/data/partial_schema/test_data_schema.rb
|
254
|
-
- spec/db/data/schema/data_schema.rb
|
255
|
-
- spec/db/data/schema/test_data_schema.rb
|
256
|
-
- spec/db/migrate/20131111111111_late_migration.rb
|
257
|
-
- spec/db/migrate/20202020202011_db_migration.rb
|
258
|
-
- spec/generators/data_migration/data_migration_generator_spec.rb
|
259
|
-
- spec/spec_helper.rb
|
260
|
-
- tasks/.gitkeep
|
261
216
|
- tasks/databases.rake
|
262
217
|
homepage: https://github.com/ilyakatz/data-migrate
|
263
218
|
licenses:
|
data/.github/workflows/build.yml
DELETED
@@ -1,35 +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-20.04" ]
|
13
|
-
ruby:
|
14
|
-
- '3.0'
|
15
|
-
- '3.1'
|
16
|
-
- '3.2'
|
17
|
-
- '3.3'
|
18
|
-
gemfile:
|
19
|
-
- gemfiles/rails_6.1.gemfile
|
20
|
-
- gemfiles/rails_7.0.gemfile
|
21
|
-
- gemfiles/rails_7.1.gemfile
|
22
|
-
runs-on: ubuntu-latest
|
23
|
-
env:
|
24
|
-
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
25
|
-
RAILS_ENV: test
|
26
|
-
steps:
|
27
|
-
- name: Checkout code
|
28
|
-
uses: actions/checkout@v3
|
29
|
-
- name: Set up Ruby
|
30
|
-
uses: ruby/setup-ruby@v1
|
31
|
-
with:
|
32
|
-
ruby-version: ${{ matrix.ruby }}
|
33
|
-
bundler-cache: true
|
34
|
-
- name: Run tests
|
35
|
-
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