Skip to content

Commit a24dd7e

Browse files
committed
added some indexes
1 parent 0dc9f4e commit a24dd7e

File tree

4 files changed

+18
-55
lines changed

4 files changed

+18
-55
lines changed

.rvmrc

+1-49
Original file line numberDiff line numberDiff line change
@@ -1,49 +1 @@
1-
#!/usr/bin/env bash
2-
3-
# This is an RVM Project .rvmrc file, used to automatically load the ruby
4-
# development environment upon cd'ing into the directory
5-
6-
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional.
7-
environment_id="ruby-1.9.2-p180@schooka"
8-
9-
#
10-
# First we attempt to load the desired environment directly from the environment
11-
# file. This is very fast and efficicent compared to running through the entire
12-
# CLI and selector. If you want feedback on which environment was used then
13-
# insert the word 'use' after --create as this triggers verbose mode.
14-
#
15-
if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
16-
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]] ; then
17-
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
18-
19-
[[ -s ".rvm/hooks/after_use" ]] && . ".rvm/hooks/after_use"
20-
else
21-
# If the environment file has not yet been created, use the RVM CLI to select.
22-
rvm --create use "$environment_id"
23-
fi
24-
25-
#
26-
# If you use an RVM gemset file to install a list of gems (*.gems), you can have
27-
# it be automatically loaded. Uncomment the following and adjust the filename if
28-
# necessary.
29-
#
30-
# filename=".gems"
31-
# if [[ -s "$filename" ]] ; then
32-
# rvm gemset import "$filename" | grep -v already | grep -v listed | grep -v complete | sed '/^$/d'
33-
# fi
34-
35-
#
36-
# If you use bundler and would like to run bundle each time you enter the
37-
# directory, you can uncomment the following code.
38-
#
39-
# # Ensure that Bundler is installed. Install it if it is not.
40-
# if ! command -v bundle >/dev/null; then
41-
# printf "The rubygem 'bundler' is not installed. Installing it now.\n"
42-
# gem install bundler
43-
# fi
44-
#
45-
# # Bundle while reducing excess noise.
46-
# printf "Bundling your gems. This may take a few minutes on a fresh clone.\n"
47-
# bundle | grep -v '^Using ' | grep -v ' is complete' | sed '/^$/d'
48-
#
49-
1+
rvm use 1.9.2@schooka --create

config/database.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
production:
1+
development: &development
2+
database: schooka_development
23
adapter: postgresql
3-
database: schooka_production
4-
username: postgres
5-
password: 14931493
4+
encoding: unicode
65
host: localhost
7-
encoding: UTF8
6+
username: postgres
7+
password: postgres
8+
pool: 5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class AddIndexToTransactionEnvelopeId < ActiveRecord::Migration
2+
def change
3+
add_index :transactions, :envelope_id
4+
add_index :envelopes, :account_id
5+
end
6+
end

db/schema.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
# It's strongly recommended to check this file into your version control system.
1313

14-
ActiveRecord::Schema.define(:version => 20110530212244) do
14+
ActiveRecord::Schema.define(:version => 20120321190933) do
1515

1616
create_table "accounts", :force => true do |t|
1717
t.string "name"
@@ -33,6 +33,8 @@
3333
t.datetime "updated_at"
3434
end
3535

36+
add_index "envelopes", ["account_id"], :name => "index_envelopes_on_account_id"
37+
3638
create_table "transactions", :force => true do |t|
3739
t.string "name"
3840
t.text "description"
@@ -42,6 +44,8 @@
4244
t.datetime "updated_at"
4345
end
4446

47+
add_index "transactions", ["envelope_id"], :name => "index_transactions_on_envelope_id"
48+
4549
create_table "users", :force => true do |t|
4650
t.string "email_address"
4751
t.string "password_digest"

0 commit comments

Comments
 (0)