lol_dba 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lol_dba.rb +1 -1
- data/lib/lol_dba/migration.rb +1 -1
- data/lib/lol_dba/sql_generator.rb +6 -1
- data/lib/lol_dba/version.rb +1 -1
- data/lib/lol_dba/writer.rb +1 -0
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f8f30bc53bf7278cad306997f434ba8de25169b
|
4
|
+
data.tar.gz: 6420eeecffc2fcb69aca524eca6978d2e294a89d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb7439613b407c72b0cc2d192a57fd291da192aa5835a7e6fbb2787f84834949774b50711838e675e5f21afce8cf741da7acd6cfd7282322ab87a134deeae78c
|
7
|
+
data.tar.gz: ceb284d9f78a6c9821fca67586b6483c033b51e01473ae3f1a51ad9f07eb419db0336848a01c6af69923f175f87053b1b078b9b25adadd4b7a924a702a8425ae
|
data/lib/lol_dba.rb
CHANGED
@@ -98,7 +98,7 @@ EOM
|
|
98
98
|
if reflection_options.options.has_key?(:polymorphic) && (reflection_options.options[:polymorphic] == true)
|
99
99
|
poly_type = "#{reflection_options.name.to_s}_type"
|
100
100
|
poly_id = "#{reflection_options.name.to_s}_id"
|
101
|
-
|
101
|
+
|
102
102
|
@index_migrations[@table_name.to_s] += [[poly_type, poly_id].sort] unless @index_migrations[@table_name.to_s].include?([poly_type, poly_id].sort)
|
103
103
|
else
|
104
104
|
foreign_key = reflection_options.options[:foreign_key] ||= reflection_options.respond_to?(:primary_key_name) ? reflection_options.primary_key_name : reflection_options.foreign_key
|
data/lib/lol_dba/migration.rb
CHANGED
@@ -55,7 +55,12 @@ module LolDba
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def migrations(which)
|
58
|
-
migrator =
|
58
|
+
migrator = nil
|
59
|
+
if ActiveRecord.version.version =~ /^4./
|
60
|
+
migrator = ActiveRecord::Migrator.new(:up, ActiveRecord::Migrator.migrations(ActiveRecord::Migrator.migrations_path))
|
61
|
+
else
|
62
|
+
migrator = ActiveRecord::Migrator.new(:up, ActiveRecord::Migrator.migrations_path)
|
63
|
+
end
|
59
64
|
if which == "all"
|
60
65
|
migrator.migrations.collect { |m| m.filename }
|
61
66
|
elsif which == "pending"
|
data/lib/lol_dba/version.rb
CHANGED
data/lib/lol_dba/writer.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lol_dba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Diego Plentz
|
@@ -12,48 +12,48 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2014-09-08 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activerecord
|
19
19
|
requirement: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
|
-
- -
|
21
|
+
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: '3.0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
|
-
- -
|
28
|
+
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: '3.0'
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: actionpack
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
34
34
|
requirements:
|
35
|
-
- -
|
35
|
+
- - ">="
|
36
36
|
- !ruby/object:Gem::Version
|
37
37
|
version: '3.0'
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
|
-
- -
|
42
|
+
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '3.0'
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
46
|
name: railties
|
47
47
|
requirement: !ruby/object:Gem::Requirement
|
48
48
|
requirements:
|
49
|
-
- -
|
49
|
+
- - ">="
|
50
50
|
- !ruby/object:Gem::Version
|
51
51
|
version: '3.0'
|
52
52
|
type: :runtime
|
53
53
|
prerelease: false
|
54
54
|
version_requirements: !ruby/object:Gem::Requirement
|
55
55
|
requirements:
|
56
|
-
- -
|
56
|
+
- - ">="
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '3.0'
|
59
59
|
description: lol_dba is a small package of rake tasks that scan your application models
|
@@ -69,8 +69,8 @@ executables:
|
|
69
69
|
extensions: []
|
70
70
|
extra_rdoc_files: []
|
71
71
|
files:
|
72
|
-
- .gitignore
|
73
|
-
- .travis.yml
|
72
|
+
- ".gitignore"
|
73
|
+
- ".travis.yml"
|
74
74
|
- Gemfile
|
75
75
|
- Gemfile.lock
|
76
76
|
- README.md
|
@@ -113,17 +113,17 @@ require_paths:
|
|
113
113
|
- lib/lol_dba
|
114
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- -
|
116
|
+
- - ">="
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
|
-
- -
|
121
|
+
- - ">="
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.
|
126
|
+
rubygems_version: 2.2.2
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: A small package of rake tasks to track down missing database indexes and
|