Permalink
Browse files

Switch to postgres 2

  • Loading branch information...
1 parent 14514e3 commit bd9b28256eefb9f31b990cc9b8d3f501ac634ee2 @josephc committed Jan 4, 2012
Showing with 66 additions and 20 deletions.
  1. +1 −1 Gemfile
  2. +5 −2 Gemfile.lock
  3. +43 −13 config/database.yml
  4. +1 −1 config/initializers/secret_token.rb
  5. +1 −3 config/routes.rb
  6. +15 −0 db/schema.rb
View
@@ -5,7 +5,7 @@ gem 'rails', '3.1.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
-gem 'sqlite3'
+gem 'pg'
gem 'json'
View
@@ -53,6 +53,8 @@ GEM
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.0.4)
+ pg (0.12.0)
+ rake-compiler (~> 0.7)
polyglot (0.3.3)
rack (1.3.5)
rack-cache (1.1)
@@ -79,6 +81,8 @@ GEM
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
+ rake-compiler (0.7.9)
+ rake
rdoc (3.12)
json (~> 1.4)
sass (3.1.12)
@@ -91,7 +95,6 @@ GEM
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sqlite3 (1.3.5)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
@@ -109,7 +112,7 @@ DEPENDENCIES
coffee-rails (~> 3.1.1)
jquery-rails
json
+ pg
rails (= 3.1.3)
sass-rails (~> 3.1.5)
- sqlite3
uglifier (>= 1.0.3)
View
@@ -1,25 +1,55 @@
-# SQLite version 3.x
-# gem install sqlite3
+# PostgreSQL. Versions 7.4 and 8.x are supported.
+#
+# Install the pg driver:
+# gem install pg
+# On Mac OS X with macports:
+# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
+# On Windows:
+# gem install pg
+# Choose the win32 build.
+# Install PostgreSQL and put its /bin directory on your path.
+#
+# Configure Using Gemfile
+# gem 'pg'
#
-# Ensure the SQLite 3 gem is defined in your Gemfile
-# gem 'sqlite3'
development:
- adapter: sqlite3
- database: db/development.sqlite3
+ adapter: postgresql
+ encoding: unicode
+ database: friendtripper_development
pool: 5
- timeout: 5000
+ username: friendtripper
+ password:
+
+ # Connect on a TCP socket. Omitted by default since the client uses a
+ # domain socket that doesn't need configuration. Windows does not have
+ # domain sockets, so uncomment these lines.
+ #host: localhost
+ #port: 5432
+
+ # Schema search path. The server defaults to $user,public
+ #schema_search_path: myapp,sharedapp,public
+
+ # Minimum log levels, in increasing order:
+ # debug5, debug4, debug3, debug2, debug1,
+ # log, notice, warning, error, fatal, and panic
+ # The server defaults to notice.
+ #min_messages: warning
# 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:
- adapter: sqlite3
- database: db/test.sqlite3
+ adapter: postgresql
+ encoding: unicode
+ database: friendtripper_test
pool: 5
- timeout: 5000
+ username: friendtripper
+ password:
production:
- adapter: sqlite3
- database: db/production.sqlite3
+ adapter: postgresql
+ encoding: unicode
+ database: friendtripper_production
pool: 5
- timeout: 5000
+ username: friendtripper
+ password:
@@ -4,4 +4,4 @@
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
-Friendtripper::Application.config.secret_token = '34d70d402a9f1dad7c109d969be2b87d2620c24ae9741b536d9e5ebd7753ca973b24cd89bdddc106ad5bb53e5ad30b8226d0720c9134c6db6ed662f3256a6d42'
+Friendtripper::Application.config.secret_token = 'be721f4cc616182f530ecd9a0b82814afba96f8ad059ee6bc88eefbaf46252c3b29aa320ca8507685498cc196bc176240a9cc37baf9f6a50e09478ff45ef1ec0'
View
@@ -1,6 +1,4 @@
Friendtripper::Application.routes.draw do
- get "home/index"
-
# The priority is based upon order of creation:
# first created -> highest priority.
@@ -50,7 +48,7 @@
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
- root :to => 'home#index'
+ # root :to => 'welcome#index'
# See how all your routes lay out with "rake routes"
View
@@ -0,0 +1,15 @@
+# This file is auto-generated from the current state of the database. Instead
+# of editing this file, please use the migrations feature of Active Record to
+# incrementally modify your database, and then regenerate this schema definition.
+#
+# Note that this schema.rb definition is the authoritative source for your
+# database schema. If you need to create the application database on another
+# system, you should be using db:schema:load, not running all the migrations
+# from scratch. The latter is a flawed and unsustainable approach (the more migrations
+# you'll amass, the slower it'll run and the greater likelihood for issues).
+#
+# It's strongly recommended to check this file into your version control system.
+
+ActiveRecord::Schema.define(:version => 0) do
+
+end

0 comments on commit bd9b282

Please sign in to comment.