data_migrate 5.3.0 → 5.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9462f36e74230a90ba6e6d8eecc2372bd2b95645728e2791ff58fe46a0603a67
4
- data.tar.gz: b8f720b2a4f81de75c4ab7a45bcb6f95a472e17569e6d06297cdc9b3bbf1407d
3
+ metadata.gz: 737ac14150dfe99227e19eff42fbe27ad4ed670abf64352497de7d795bb63ffe
4
+ data.tar.gz: 44d29c907e88b2fa0cfb2686b9d5a61ac52be77b2d80d528840f3fa7be150a95
5
5
  SHA512:
6
- metadata.gz: 481d64df974f86ad1c81f8ab064afd16ccd9596b924de2ea09f8060bc85f4cf39cf4501af54e45d473d00c71ab8a272173e4a898a421d2cef0f8993b64bdfe5f
7
- data.tar.gz: 27e18b67499e98a64cced4c95ad5c145f9d0b4213be841966c8c38f90dbd2d9e2fcac55b70afa02ceb2917c54851cae40e8e34df32782fffb4ca3e93b2da989d
6
+ metadata.gz: 01436d19ffc4671f27bdbdade83539d8c4a2e2b9ff3a632740beb8851cdeea43c1d39edc6288be41d6d695f268c70706f09a016412438a92c44cc1e86495f2bd
7
+ data.tar.gz: d51939c5695ff458db14bb5df3f9a276e3a8d576fcb3372573fa4babbd2bdef29df63e2e51942c52b663f3c76fdeffb3d92769ae042cf0ecf50777cceade98bd
data/Changelog.md CHANGED
@@ -1,6 +1,15 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## 5.3.2
5
+ Fix capistrano migration tasks to only skip migrations if there are no changes in the db/data and db/migrate folders
6
+
7
+ ## 5.3.1
8
+ Change database task to use data_migrations_path_configuration
9
+
10
+ ## 5.3.0
11
+ Add support to configure data migration path
12
+
4
13
  ## 5.1.0
5
14
  Fixes to `db:schema:load:with_data` + `db:structure:load:with_data` definition, thanks to [craineum](https://github.com/craineum)
6
15
 
@@ -7,10 +7,9 @@ namespace :deploy do
7
7
  conditionally_migrate = fetch(:conditionally_migrate)
8
8
  info '[deploy:migrate] Checking changes in db/migrate or db/data' if conditionally_migrate
9
9
 
10
- if conditionally_migrate && (
11
- test("diff -q #{release_path}/db/migrate #{current_path}/db/migrate") ||
12
- test("diff -q #{release_path}/db/data #{current_path}/db/data")
13
- )
10
+ if conditionally_migrate &&
11
+ test("diff -q #{release_path}/db/migrate #{current_path}/db/migrate") &&
12
+ test("diff -q #{release_path}/db/data #{current_path}/db/data")
14
13
  info '[deploy:migrate] Skip `deploy:migrate` (nothing changed in db/migrate or db/data)'
15
14
  else
16
15
  info '[deploy:migrate] Run `rake db:migrate:with_data`'
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "active_record"
4
+ require "data_migrate/config"
4
5
 
5
6
  module DataMigrate
6
7
  class DataMigrator < ActiveRecord::Migrator
7
- self.migrations_paths = ["db/data"]
8
+ self.migrations_paths = [DataMigrate.config.data_migrations_path]
8
9
 
9
10
  def self.assure_data_schema_table
10
11
  ActiveRecord::Base.establish_connection(db_config)
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "data_migrate/config"
4
+
3
5
  module DataMigrate
4
6
  ##
5
7
  # This class extends DatabaseTasks to add a schema_file method.
@@ -26,7 +28,7 @@ module DataMigrate
26
28
  end
27
29
 
28
30
  def self.data_migrations_path
29
- "db/data/"
31
+ DataMigrate.config.data_migrations_path
30
32
  end
31
33
 
32
34
  def self.schema_migrations_path
@@ -1,3 +1,3 @@
1
1
  module DataMigrate
2
- VERSION = "5.3.0".freeze
2
+ VERSION = "5.3.2".freeze
3
3
  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: 5.3.0
4
+ version: 5.3.2
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: 2018-12-10 00:00:00.000000000 Z
13
+ date: 2019-04-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -278,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
278
278
  version: '0'
279
279
  requirements: []
280
280
  rubyforge_project: data_migrate
281
- rubygems_version: 2.7.4
281
+ rubygems_version: 2.7.8
282
282
  signing_key:
283
283
  specification_version: 4
284
284
  summary: Rake tasks to migrate data alongside schema changes.