Change database backend to PostgreSQL

* Bundle pg gem
* Add a database config file sample
This commit is contained in:
Thibault Jouan 2011-09-13 19:22:06 +00:00
parent ceb6f18c01
commit 20e8bdbf4f
5 changed files with 24 additions and 29 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
.bundle
db/*.sqlite3
config/database.yml
log/*.log
tmp/

View File

@ -2,7 +2,7 @@ source 'http://rubygems.org'
gem 'rails', '3.0.9'
gem 'sqlite3'
gem 'pg'
gem 'haml'

View File

@ -79,6 +79,7 @@ GEM
treetop (~> 1.4.8)
mime-types (1.16)
nokogiri (1.5.0)
pg (0.11.0)
polyglot (0.3.1)
rack (1.2.2)
rack-mount (0.6.14)
@ -123,7 +124,6 @@ GEM
json_pure
rubyzip
spork (0.9.0.rc9)
sqlite3 (1.3.3)
term-ansicolor (1.0.5)
thor (0.14.6)
treetop (1.4.9)
@ -145,8 +145,8 @@ DEPENDENCIES
guard-rspec
guard-spork
haml
pg
rails (= 3.0.9)
rb-inotify
rspec-rails
spork (~> 0.9.0.rc)
sqlite3

View File

@ -1,25 +0,0 @@
# SQLite version 3.x
# gem install sqlite3
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# 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: &test
adapter: sqlite3
database: ':memory:'
pool: 5
timeout: 5000
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
cucumber:
<<: *test

View File

@ -0,0 +1,20 @@
common: &common
adapter: postgresql
encoding: unicode
pool: 5
username: scube
development:
<<: *common
database: scube_development
test: &test
<<: *common
database: scube_test
production:
<<: *common
database: scube_production
cucumber:
<<: *test