Skip to content

Commit

Permalink
alterado o db de desenvolvimento para postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
amalrik committed Oct 9, 2012
1 parent 366114f commit fc8dab0
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -9,7 +9,7 @@

# Ignore the default SQLite database.
/db/*.sqlite3
/db/db_development
/db/*development*

# Ignore all logfiles and tempfiles.
/log/*.log
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -6,7 +6,7 @@ gem 'rails', '3.2.8'
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'pg'
gem 'sqlite3'
#gem 'sqlite3'
gem 'sorcery'

# Gems used only for assets and not required
Expand Down
2 changes: 0 additions & 2 deletions Gemfile.lock
Expand Up @@ -96,7 +96,6 @@ GEM
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
thor (0.15.4)
tilt (1.3.3)
treetop (1.4.10)
Expand All @@ -116,5 +115,4 @@ DEPENDENCIES
rails (= 3.2.8)
sass-rails (~> 3.2.3)
sorcery
sqlite3
uglifier (>= 1.0.3)
2 changes: 1 addition & 1 deletion app/controllers/user_sessions_controller.rb
Expand Up @@ -14,6 +14,6 @@ def create

def destroy
logout
redirect_to(:authors, :message => 'Logged out!')
redirect_to(:root, :message => 'Logged out!')
end
end
13 changes: 10 additions & 3 deletions config/database.yml
Expand Up @@ -3,10 +3,17 @@
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
#development:
# adapter: sqlite3
# database: db/db_development
# timeout: 5000
development:
adapter: sqlite3
database: db/db_development
timeout: 5000
adapter: postgresql
encoding: utf8
database: fight_bets_development
pool: 5
username: fight_bets
password: maça

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
Expand Down
2 changes: 1 addition & 1 deletion db/schema.rb
Expand Up @@ -15,10 +15,10 @@

create_table "bets", :force => true do |t|
t.integer "user_id"
t.integer "fight_id"
t.string "winner"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "fight_id"
end

create_table "events", :force => true do |t|
Expand Down

0 comments on commit fc8dab0

Please sign in to comment.