Skip to content

Commit

Permalink
use pg
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacchansky committed Oct 8, 2014
1 parent 42a922f commit 4d0b086
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
DB_ADAPTER=sqlite3
DB_ADAPTER=postgres
DB_HOSTNAME=localhost
DB_NAME=agora
Binary file removed agora.db
Binary file not shown.
3 changes: 1 addition & 2 deletions app/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ class Agora < Sinatra::Application
config_file("config.yml")

# Set up DB
# DataMapper.setup(:default, "#{ENV['DB_ADAPTER']}://#{ENV['DB_HOSTNAME']}/#{ENV['DB_NAME']}")
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/agora.db")
DataMapper.setup(:default, "#{ENV['DB_ADAPTER']}://#{ENV['DB_HOSTNAME']}/#{ENV['DB_NAME']}")

Event.auto_upgrade!
Source.auto_upgrade!
Expand Down
1 change: 0 additions & 1 deletion app/routes.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'slim'
require 'data_mapper'
require 'dm-sqlite-adapter'

class Agora < Sinatra::Application

Expand Down

0 comments on commit 4d0b086

Please sign in to comment.