migration_tools 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/migration_tools/tasks.rb +8 -8
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb346f046cdd5dfa19061ce3ce07920766774f25
|
4
|
+
data.tar.gz: bb7ea53335abd3ae2426d73c7cc60175bbbde450
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfc016231d6400e0e67df29f157f8e0d77bc2cee960e2467c799da4944fd1fded2dcd607b847cb4c450a2088d95c7ca4fafb9b20c4a3c94438120d6c0eb51b81
|
7
|
+
data.tar.gz: 7ea498034b6d31a78bc5b11598647d41e64c0b924351bd416e0b474bd618b19d717a94346347365beadca7f1993b7f2e3e18ceabe762e0d40182831ea3b45fea
|
@@ -24,15 +24,15 @@ module MigrationTools
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def migrations_paths
|
27
|
-
|
28
|
-
ActiveRecord::Migrator.migrations_paths
|
29
|
-
else
|
30
|
-
'db/migrate'
|
31
|
-
end
|
27
|
+
ActiveRecord::Migrator.migrations_paths
|
32
28
|
end
|
33
29
|
|
34
|
-
def migrator
|
35
|
-
|
30
|
+
def migrator(target_version = nil)
|
31
|
+
if ActiveRecord::VERSION::MAJOR > 3
|
32
|
+
ActiveRecord::Migrator.new(:up, ActiveRecord::Migrator.migrations(migrations_paths), target_version)
|
33
|
+
else
|
34
|
+
ActiveRecord::Migrator.new(:up, migrations_paths, target_version)
|
35
|
+
end
|
36
36
|
end
|
37
37
|
|
38
38
|
def pending_migrations
|
@@ -72,7 +72,7 @@ module MigrationTools
|
|
72
72
|
notify "Your database schema is up to date"
|
73
73
|
else
|
74
74
|
pending_migrations.each do |migration|
|
75
|
-
|
75
|
+
migrator(migration.version).run
|
76
76
|
end
|
77
77
|
|
78
78
|
Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: migration_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Morten Primdahl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -44,6 +44,20 @@ dependencies:
|
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: bump
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
47
61
|
- !ruby/object:Gem::Dependency
|
48
62
|
name: mocha
|
49
63
|
requirement: !ruby/object:Gem::Requirement
|