Skip to content

Commit

Permalink
use pg on localhost for development
Browse files Browse the repository at this point in the history
  • Loading branch information
qrohlf committed Sep 23, 2014
1 parent 253ef56 commit 412e8f0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ gem "rails-assets-chartjs", "1.0.1.beta.4"
gem 'bootstrap-generators', '~> 3.1.1'
gem 'hirb'

gem 'pg' #postgres

group :development do
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
gem 'faker'
end

group :production do
gem 'rails_12factor'
gem 'pg'
gem 'unicorn'
end
5 changes: 3 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ GEM
dotenv-deployment (0.0.2)
erubis (2.7.0)
execjs (2.2.1)
faker (1.4.3)
i18n (~> 0.5)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
friendly_id (5.0.4)
Expand Down Expand Up @@ -158,7 +160,6 @@ GEM
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.9)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
Expand Down Expand Up @@ -186,6 +187,7 @@ DEPENDENCIES
bootstrap-sass (~> 3.2.0)
coffee-rails (~> 4.0.0)
dotenv
faker
friendly_id (~> 5.0.0)
haml-rails
high_voltage
Expand All @@ -204,7 +206,6 @@ DEPENDENCIES
sass-rails (~> 4.0.3)
sdoc (~> 0.4.0)
spring
sqlite3
turbolinks
uglifier (>= 1.3.0)
unicorn
8 changes: 4 additions & 4 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
# gem 'sqlite3'
#
default: &default
adapter: sqlite3
adapter: postgresql
pool: 5
timeout: 5000

development:
<<: *default
database: db/development.sqlite3
database: gradebook-dev

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: db/test.sqlite3
database: gradebook-test

production:
adapter: postgres
adapter: postgresql
encoding: unicode
pool: 5
17 changes: 10 additions & 7 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

ActiveRecord::Schema.define(version: 20140922001500) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"

create_table "assignments", force: true do |t|
t.string "title"
t.string "details"
Expand All @@ -29,10 +32,10 @@
t.datetime "created_at"
end

add_index "friendly_id_slugs", ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true
add_index "friendly_id_slugs", ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type"
add_index "friendly_id_slugs", ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id"
add_index "friendly_id_slugs", ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type"
add_index "friendly_id_slugs", ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true, using: :btree
add_index "friendly_id_slugs", ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type", using: :btree
add_index "friendly_id_slugs", ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id", using: :btree
add_index "friendly_id_slugs", ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type", using: :btree

create_table "students", force: true do |t|
t.string "first_name"
Expand All @@ -46,7 +49,7 @@
t.datetime "last_sync"
end

add_index "students", ["slug"], name: "index_students_on_slug", unique: true
add_index "students", ["slug"], name: "index_students_on_slug", unique: true, using: :btree

create_table "submissions", force: true do |t|
t.string "tag"
Expand All @@ -58,7 +61,7 @@
t.string "feedback"
end

add_index "submissions", ["assignment_id"], name: "index_submissions_on_assignment_id"
add_index "submissions", ["student_id"], name: "index_submissions_on_student_id"
add_index "submissions", ["assignment_id"], name: "index_submissions_on_assignment_id", using: :btree
add_index "submissions", ["student_id"], name: "index_submissions_on_student_id", using: :btree

end

0 comments on commit 412e8f0

Please sign in to comment.