rails-rebase-migrations 1.4.0 → 1.5.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/lib/rails_rebase_migrations.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 52e057c21fc0b84f65f95a81aaed67cc1f470d253fc1f19cb4d70a2f048f5eee
|
|
4
|
+
data.tar.gz: 66cedc9a7c2445a52e1dc5bca8c8ee0c45572cba438375b81b4a31ab68bc11a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3d1d59029ffea4f45ff82813516c74f6f12a104bdbb5d4855e2fe3c495569fa5f0d25d8140daf6f7c2cdea63839a8384deacf98606c7df35185157bd1ca37e3f
|
|
7
|
+
data.tar.gz: 60eb484ef03ed45a3f8e609f6458f58cabcefa27ec65a35c2b675771daeec94d17fd5c84bf39072e2a3de869d9a79de7414ae909f7eefb21f2c3d5be0bf69ad8
|
|
@@ -7,6 +7,7 @@ require 'time'
|
|
|
7
7
|
|
|
8
8
|
class RebaseMigrations
|
|
9
9
|
SKIP_REBASE = '_skip_rebase_'
|
|
10
|
+
SQUASHED_MIGRATIONS = '_squashed_migrations.rb'
|
|
10
11
|
|
|
11
12
|
MIGRATIONS_DIR = 'db/migrate/'
|
|
12
13
|
MIGRATION_NAME_RE = /\A(\d+)(.*)\z/
|
|
@@ -29,7 +30,7 @@ class RebaseMigrations
|
|
|
29
30
|
last_timestamp = match[1]
|
|
30
31
|
now = [Time.now.utc, Time.strptime("#{last_timestamp}Z", "#{TIME_FORMAT}%Z")].max.to_i
|
|
31
32
|
|
|
32
|
-
all_migrations.each do |path|
|
|
33
|
+
all_migrations.each.with_index do |path, index|
|
|
33
34
|
next if ref_migrations.include?(path)
|
|
34
35
|
|
|
35
36
|
basename = File.basename(path)
|
|
@@ -38,6 +39,9 @@ class RebaseMigrations
|
|
|
38
39
|
migration_name_base = match[2]
|
|
39
40
|
next if migration_name_base.start_with?(SKIP_REBASE)
|
|
40
41
|
|
|
42
|
+
# Skip the file generated by rails-squash-migrations.
|
|
43
|
+
next if index.zero? && migration_name_base == SQUASHED_MIGRATIONS
|
|
44
|
+
|
|
41
45
|
if options[:check]
|
|
42
46
|
index = all_migrations.index(path)
|
|
43
47
|
if index < starting_index
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails-rebase-migrations
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pioneer Valley Books
|
|
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
97
97
|
- !ruby/object:Gem::Version
|
|
98
98
|
version: '0'
|
|
99
99
|
requirements: []
|
|
100
|
-
rubygems_version:
|
|
100
|
+
rubygems_version: 4.0.3
|
|
101
101
|
specification_version: 4
|
|
102
102
|
summary: Rebase Rails migrations to be the latest
|
|
103
103
|
test_files: []
|