migration_tools 1.0.1 → 1.1.0
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 +10 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89a69b8e5e0dcc567f3f1c14f7342028e6285a3a
|
4
|
+
data.tar.gz: 64fe35e50f73698266eeb47543594205664d64bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73ad48eab61b0aa13104a898f061c9b9ea85987ebfa074d4ecb7ebfe3519b4fbf89d0de93c5872b1239f6f1d72e789a22fad06a6f392ae4bd839d42eb67363d9
|
7
|
+
data.tar.gz: 61b9fd6b06721f65207759ea63b86773f4afa2f7763f5964ec74572c71ddb158864c14d21c808653492d5841a830ce1463b685be116feee179541b06e79b7f17
|
@@ -23,8 +23,16 @@ module MigrationTools
|
|
23
23
|
ENV['GROUP'] = group
|
24
24
|
end
|
25
25
|
|
26
|
+
def migrations_paths
|
27
|
+
if ActiveRecord::Migrator.respond_to?(:migrations_paths)
|
28
|
+
ActiveRecord::Migrator.migrations_paths
|
29
|
+
else
|
30
|
+
'db/migrate'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
26
34
|
def migrator
|
27
|
-
@migrator ||= ActiveRecord::Migrator.new(:up,
|
35
|
+
@migrator ||= ActiveRecord::Migrator.new(:up, migrations_paths)
|
28
36
|
end
|
29
37
|
|
30
38
|
def pending_migrations
|
@@ -64,7 +72,7 @@ module MigrationTools
|
|
64
72
|
notify "Your database schema is up to date"
|
65
73
|
else
|
66
74
|
pending_migrations.each do |migration|
|
67
|
-
ActiveRecord::Migrator.run(:up,
|
75
|
+
ActiveRecord::Migrator.run(:up, migrations_paths, migration.version)
|
68
76
|
end
|
69
77
|
|
70
78
|
Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: migration_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Morten Primdahl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
description: Rake tasks for Rails that add groups to migrations
|
@@ -43,17 +43,17 @@ require_paths:
|
|
43
43
|
- lib
|
44
44
|
required_ruby_version: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '0'
|
54
54
|
requirements: []
|
55
55
|
rubyforge_project:
|
56
|
-
rubygems_version: 2.
|
56
|
+
rubygems_version: 2.2.2
|
57
57
|
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: Encourage migrations that do not require downtime
|