Topic: Chabge sqlite3 to pg

i was wondering what is everything that i need to change to change my application from a sqlite3 to a PG
i hear that all i have to do is add the pg gem but that is not it

Re: Chabge sqlite3 to pg

Changes i made

vim config/database.yml
from

# SQLite version 3.x
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem '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:
  adapter: sqlite3
  database: db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: sqlite3
  database: db/production.sqlite3
  pool: 5
  timeout: 5000

to

development:
  adapter: postgresql
  encoding: utf8
  database: development
  pool: 5
  username:-
  password:

test: &TEST
  adapter: postgresql
  encoding: utf8
  database: test
  pool: 5
  username:-
  password:

production:
  adapter: postgresql
  encoding: utf8
  database: production
  pool: 5
  username:-
  password:

cucumber:
  <<: *TEST

i think i did this write smile

Re: Chabge sqlite3 to pg

Also don't forget that postgresql is case-sensitive, whereas sqlite3 is not. You may want to review your code to see if this will be an issue.