lol_dba 1.4.1 → 1.4.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.
- data/.travis.yml +10 -0
- data/README.md +12 -18
- data/lib/lol_dba/migration.rb +1 -1
- data/lib/lol_dba/version.rb +1 -1
- metadata +40 -46
- data/spec/fixtures/app/controllers/cats_controller.rb +0 -14
- data/spec/fixtures/app/controllers/users_controller.rb +0 -8
- data/spec/fixtures/app/sweepers/user_sweeper.rb +0 -9
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
#lol_dba
|
1
|
+
#lol_dba 
|
2
2
|
|
3
3
|
lol_dba is a small package of rake tasks that scan your application models and displays a list of columns that probably should be indexed. Also, it can generate .sql migration scripts. Most of the code come from rails_indexes and migration_sql_generator.
|
4
4
|
|
5
|
-
Installation
|
6
|
-
------------
|
5
|
+
### Installation
|
7
6
|
|
8
7
|
Add lol_dba to your Gemfile:
|
9
8
|
|
@@ -13,8 +12,7 @@ and install gem
|
|
13
12
|
|
14
13
|
bundle install
|
15
14
|
|
16
|
-
Usage
|
17
|
-
-----
|
15
|
+
### Usage
|
18
16
|
|
19
17
|
Display a migration for adding/removing all necessary indexes based on associations:
|
20
18
|
|
@@ -26,32 +24,28 @@ Generate .sql files for all your migrations inside db/migrate_sql folder:
|
|
26
24
|
|
27
25
|
Note that create an index in a big database may take a long time.
|
28
26
|
|
29
|
-
Compatibility
|
30
|
-
-------------
|
27
|
+
### Compatibility
|
31
28
|
|
32
29
|
Compatible with Ruby 1.9 and Rails 3.x. I think.
|
33
30
|
|
34
|
-
About primary_key
|
35
|
-
|
31
|
+
### About primary_key
|
32
|
+
|
36
33
|
>The primary key is always indexed. This is generally true for all storage engines that at all supports indices.
|
37
34
|
|
38
|
-
For this reason, no longer
|
35
|
+
For this reason, we no longer suggest to add indexes to primary keys.
|
39
36
|
|
40
|
-
Tests
|
41
|
-
-----
|
37
|
+
### Tests
|
42
38
|
|
43
39
|
bundle install
|
44
40
|
rake
|
45
41
|
|
46
42
|
to run the tests.
|
47
43
|
|
48
|
-
Feedback
|
49
|
-
--------
|
44
|
+
### Feedback
|
50
45
|
|
51
46
|
All feedback, bug reports and thoughts on this gratefully received.
|
52
47
|
|
53
|
-
Contributors
|
54
|
-
------
|
48
|
+
### Contributors
|
55
49
|
|
56
50
|
* [Diego Plentz](http://plentz.org)
|
57
51
|
* [Elad Meidar](http://blog.eizesus.com)
|
@@ -60,6 +54,6 @@ Contributors
|
|
60
54
|
* [Muness Alrubaie](http://muness.blogspot.com/)
|
61
55
|
* [Vladimir Sharshov](https://github.com/warpc)
|
62
56
|
|
63
|
-
License
|
64
|
-
|
57
|
+
### License
|
58
|
+
|
65
59
|
Lol DBA is released under the MIT license.
|
data/lib/lol_dba/migration.rb
CHANGED
data/lib/lol_dba/version.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lol_dba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
4
|
+
prerelease:
|
5
|
+
version: 1.4.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Diego Plentz
|
@@ -10,62 +10,60 @@ authors:
|
|
10
10
|
- Eric Davis
|
11
11
|
- Muness Alrubaie
|
12
12
|
- Vladimir Sharshov
|
13
|
-
autorequire:
|
13
|
+
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date:
|
16
|
+
date: 2013-01-29 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: activerecord
|
20
|
-
|
21
|
-
none: false
|
20
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
21
|
requirements:
|
23
|
-
- -
|
22
|
+
- - ">="
|
24
23
|
- !ruby/object:Gem::Version
|
25
24
|
version: '3.0'
|
26
|
-
type: :runtime
|
27
|
-
prerelease: false
|
28
|
-
version_requirements: !ruby/object:Gem::Requirement
|
29
25
|
none: false
|
26
|
+
requirement: !ruby/object:Gem::Requirement
|
30
27
|
requirements:
|
31
|
-
- -
|
28
|
+
- - ">="
|
32
29
|
- !ruby/object:Gem::Version
|
33
30
|
version: '3.0'
|
31
|
+
none: false
|
32
|
+
prerelease: false
|
33
|
+
type: :runtime
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: actionpack
|
36
|
-
|
37
|
-
none: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
37
|
requirements:
|
39
|
-
- -
|
38
|
+
- - ">="
|
40
39
|
- !ruby/object:Gem::Version
|
41
40
|
version: '3.0'
|
42
|
-
type: :runtime
|
43
|
-
prerelease: false
|
44
|
-
version_requirements: !ruby/object:Gem::Requirement
|
45
41
|
none: false
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
46
43
|
requirements:
|
47
|
-
- -
|
44
|
+
- - ">="
|
48
45
|
- !ruby/object:Gem::Version
|
49
46
|
version: '3.0'
|
47
|
+
none: false
|
48
|
+
prerelease: false
|
49
|
+
type: :runtime
|
50
50
|
- !ruby/object:Gem::Dependency
|
51
51
|
name: railties
|
52
|
-
|
53
|
-
none: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
53
|
requirements:
|
55
|
-
- -
|
54
|
+
- - ">="
|
56
55
|
- !ruby/object:Gem::Version
|
57
56
|
version: '3.0'
|
58
|
-
type: :runtime
|
59
|
-
prerelease: false
|
60
|
-
version_requirements: !ruby/object:Gem::Requirement
|
61
57
|
none: false
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
62
59
|
requirements:
|
63
|
-
- -
|
60
|
+
- - ">="
|
64
61
|
- !ruby/object:Gem::Version
|
65
62
|
version: '3.0'
|
66
|
-
|
67
|
-
|
68
|
-
|
63
|
+
none: false
|
64
|
+
prerelease: false
|
65
|
+
type: :runtime
|
66
|
+
description: lol_dba is a small package of rake tasks that scan your application models and displays a list of columns that probably should be indexed. Also, it can generate .sql migration scripts.
|
69
67
|
email:
|
70
68
|
- diego@plentz.org
|
71
69
|
- elad@eizesus.com
|
@@ -75,7 +73,8 @@ executables: []
|
|
75
73
|
extensions: []
|
76
74
|
extra_rdoc_files: []
|
77
75
|
files:
|
78
|
-
- .gitignore
|
76
|
+
- ".gitignore"
|
77
|
+
- ".travis.yml"
|
79
78
|
- Gemfile
|
80
79
|
- Gemfile.lock
|
81
80
|
- README.md
|
@@ -90,8 +89,6 @@ files:
|
|
90
89
|
- lol_dba.gemspec
|
91
90
|
- spec/associations_index_spec.rb
|
92
91
|
- spec/common_function_spec.rb
|
93
|
-
- spec/fixtures/app/controllers/cats_controller.rb
|
94
|
-
- spec/fixtures/app/controllers/users_controller.rb
|
95
92
|
- spec/fixtures/app/models/address.rb
|
96
93
|
- spec/fixtures/app/models/billable_week.rb
|
97
94
|
- spec/fixtures/app/models/company.rb
|
@@ -106,40 +103,38 @@ files:
|
|
106
103
|
- spec/fixtures/app/models/worker.rb
|
107
104
|
- spec/fixtures/app/models/worker_user.rb
|
108
105
|
- spec/fixtures/app/models/wrong.rb
|
109
|
-
- spec/fixtures/app/sweepers/user_sweeper.rb
|
110
106
|
- spec/fixtures/schema.rb
|
111
107
|
- spec/spec_helper.rb
|
112
108
|
homepage: https://github.com/plentz/lol_dba
|
113
109
|
licenses: []
|
114
|
-
post_install_message:
|
110
|
+
post_install_message:
|
115
111
|
rdoc_options: []
|
116
112
|
require_paths:
|
117
113
|
- lib
|
118
114
|
- lib/lol_dba
|
119
115
|
required_ruby_version: !ruby/object:Gem::Requirement
|
120
|
-
none: false
|
121
116
|
requirements:
|
122
|
-
- -
|
117
|
+
- - ">="
|
123
118
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
125
|
-
|
119
|
+
version: !binary |-
|
120
|
+
MA==
|
126
121
|
none: false
|
122
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
123
|
requirements:
|
128
|
-
- -
|
124
|
+
- - ">="
|
129
125
|
- !ruby/object:Gem::Version
|
130
|
-
version:
|
126
|
+
version: !binary |-
|
127
|
+
MA==
|
128
|
+
none: false
|
131
129
|
requirements: []
|
132
|
-
rubyforge_project:
|
130
|
+
rubyforge_project:
|
133
131
|
rubygems_version: 1.8.24
|
134
|
-
signing_key:
|
132
|
+
signing_key:
|
135
133
|
specification_version: 3
|
136
|
-
summary: A small package of rake tasks to track down missing database indexes and
|
137
|
-
generate sql migration scripts
|
134
|
+
summary: A small package of rake tasks to track down missing database indexes and generate sql migration scripts
|
138
135
|
test_files:
|
139
136
|
- spec/associations_index_spec.rb
|
140
137
|
- spec/common_function_spec.rb
|
141
|
-
- spec/fixtures/app/controllers/cats_controller.rb
|
142
|
-
- spec/fixtures/app/controllers/users_controller.rb
|
143
138
|
- spec/fixtures/app/models/address.rb
|
144
139
|
- spec/fixtures/app/models/billable_week.rb
|
145
140
|
- spec/fixtures/app/models/company.rb
|
@@ -154,6 +149,5 @@ test_files:
|
|
154
149
|
- spec/fixtures/app/models/worker.rb
|
155
150
|
- spec/fixtures/app/models/worker_user.rb
|
156
151
|
- spec/fixtures/app/models/wrong.rb
|
157
|
-
- spec/fixtures/app/sweepers/user_sweeper.rb
|
158
152
|
- spec/fixtures/schema.rb
|
159
153
|
- spec/spec_helper.rb
|