seed_migration 1.2.1 → 1.2.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 +4 -4
- data/lib/seed_migration/migrator.rb +2 -3
- data/lib/seed_migration/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34a5c7f434f5a16153c4beee3ea4d9f44fbee4fc
|
4
|
+
data.tar.gz: e2d6dcdf19b2638677c1ee1560188fcd69dbb2aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25b9749cb686fc0f0c871047f6a1374edadded95d8d29d2076bacde30ab68a3fd95e5868ffd51cce5cca9734b93cdf59228ca278bad8cf5a94ddca1144554b24
|
7
|
+
data.tar.gz: 92f119701d886780bb202c596a2f61e32c5724b2d00258596d76415c98d7f86f36d3b51e6f045f50fff002877f88c6cec42a5875f05bbec7dd93333224b3ee30
|
@@ -20,7 +20,7 @@ module SeedMigration
|
|
20
20
|
def up
|
21
21
|
# Check if we already migrated this file
|
22
22
|
klass = class_from_path
|
23
|
-
version =
|
23
|
+
version, _ = self.class.parse_migration_filename(@path)
|
24
24
|
raise "#{klass} has already been migrated." if SeedMigration::DataMigration.where(version: version).first
|
25
25
|
|
26
26
|
start_time = Time.now
|
@@ -129,9 +129,8 @@ module SeedMigration
|
|
129
129
|
p "Assume seed data migrated up to #{last_timestamp}"
|
130
130
|
files = get_migration_files(last_timestamp.to_s)
|
131
131
|
files.each do |file|
|
132
|
-
_, version = parse_migration_filename(file)
|
133
132
|
migration = SeedMigration::DataMigration.new
|
134
|
-
migration.version =
|
133
|
+
migration.version, _ = parse_migration_filename(file)
|
135
134
|
migration.runtime = 0
|
136
135
|
migration.migrated_on = DateTime.now
|
137
136
|
migration.save!
|
metadata
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seed_migration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy O'Neill
|
8
8
|
- Daniel Schwartz
|
9
9
|
- Ilya Rubnich
|
10
10
|
- Pierre Jambet
|
11
|
+
- Sunny Ng
|
11
12
|
autorequire:
|
12
13
|
bindir: bin
|
13
14
|
cert_chain: []
|
14
|
-
date: 2016-10-
|
15
|
+
date: 2016-10-05 00:00:00.000000000 Z
|
15
16
|
dependencies:
|
16
17
|
- !ruby/object:Gem::Dependency
|
17
18
|
name: pry
|
@@ -86,9 +87,9 @@ dependencies:
|
|
86
87
|
description: Rails gem for Data Migrations
|
87
88
|
email:
|
88
89
|
- aoneill@harrys.com
|
89
|
-
- daniel@harrys.com
|
90
90
|
- ilya@harrys.com
|
91
91
|
- pierre@harrys.com
|
92
|
+
- sunny@harrys.com
|
92
93
|
executables: []
|
93
94
|
extensions: []
|
94
95
|
extra_rdoc_files: []
|