Skip to content

Commit

Permalink
switched to postgres db
Browse files Browse the repository at this point in the history
  • Loading branch information
annacarey committed Apr 9, 2020
1 parent 51eb184 commit 6bc2781
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ruby '2.6.1'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.2', '>= 6.0.2.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'
gem 'pg'
# Use Puma as the app server
gem 'puma', '~> 4.1'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ GEM
nio4r (2.5.2)
nokogiri (1.10.8)
mini_portile2 (~> 2.4.0)
pg (1.2.3)
puma (4.3.1)
nio4r (~> 2.0)
rack (2.2.2)
Expand Down Expand Up @@ -145,7 +146,6 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
thor (0.20.3)
thread_safe (0.3.6)
twilio-ruby (5.31.4)
Expand All @@ -168,12 +168,12 @@ DEPENDENCIES
fast_jsonapi
figaro
listen (>= 3.0.5, < 3.2)
pg
puma (~> 4.1)
rack-cors
rails (~> 6.0.2, >= 6.0.2.1)
spring
spring-watcher-listen (~> 2.0.0)
sqlite3 (~> 1.4)
twilio-ruby
tzinfo-data

Expand Down
9 changes: 5 additions & 4 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@
# gem 'sqlite3'
#
default: &default
adapter: sqlite3
adapter: postgresql
encoding: unicode
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000

development:
<<: *default
database: db/development.sqlite3
database: bestie-api_development

# 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:
<<: *default
database: db/test.sqlite3
database: bestie-api_test

production:
<<: *default
database: db/production.sqlite3
database: bestie-api_production
20 changes: 10 additions & 10 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
anna = User.create(name: "Anna", email: "[email protected]", phone_number: "914-907-4672", image_url: "test")
calvin = User.create(name: "Calvin", email: "[email protected]", phone_number: "555-555-5555", image_url: "test")

Friend.create(name: "Michelle", phone_number: "914-907-9336", image_url: "test", date_last_outreach: Time.now, priority: "High", user: anna)
Friend.create(name: "Ethan", phone_number: "914-907-9336", image_url: "test", date_last_outreach: Time.now, priority: "High", user: anna)
Friend.create(name: "Sarah", phone_number: "914-907-9336", image_url: "test", date_last_outreach: Time.now, priority: "High", user: calvin)
Friend.create(name: "Cory", phone_number: "914-907-9336", image_url: "test", date_last_outreach: Time.now, priority: "High", user: calvin)
Friend.create(name: "Josh", phone_number: "914-907-9336", image_url: "test", date_last_outreach: Time.now, priority: "Medium", user: calvin)
Friend.create(name: "Nathan", phone_number: "914-907-9336", image_url: "test", date_last_outreach: Time.now, priority: "Medium", user: calvin)
Friend.create(name: "Maria", phone_number: "914-907-9336", image_url: "test", date_last_outreach: Time.now, priority: "Low", user: calvin)
Friend.create(name: "Gertrude", phone_number: "914-907-9336", image_url: "test", date_last_outreach: Time.now, priority: "Low", user: calvin)
Friend.create(name: "Corinne", phone_number: "914-907-9336", image_url: "test", date_last_outreach: Time.now, priority: "Medium", user: calvin)
Friend.create(name: "Balthazar", phone_number: "914-907-9336", image_url: "test", date_last_outreach: Time.now, priority: "Low", user: calvin)
Friend.create(name: "Rachel", phone_number: "+19149074672", image_url: "https://akns-images.eonline.com/eol_images/Entire_Site/2019031/rs_600x600-190131112337-600-rachel-friends.jpg?fit=around|1200:1200&crop=1200:1200;center,top&output-quality=90", date_last_outreach: Time.now, priority: "High", user: anna)
Friend.create(name: "Joey", phone_number: "+19149074672", image_url: "https://www.cheatsheet.com/wp-content/uploads/2019/10/matt-le-blanc.jpg", date_last_outreach: Time.now, priority: "High", user: anna)
Friend.create(name: "Chandler", phone_number: "+19149074672", image_url: "https://pmctvline2.files.wordpress.com/2017/05/friends-chandler-video.jpg?w=620", date_last_outreach: Time.now, priority: "High", user: calvin)
Friend.create(name: "Rachel", phone_number: "+19149074672", image_url: "https://akns-images.eonline.com/eol_images/Entire_Site/2019031/rs_600x600-190131112337-600-rachel-friends.jpg?fit=around|1200:1200&crop=1200:1200;center,top&output-quality=90", date_last_outreach: Time.now, priority: "High", user: calvin)
Friend.create(name: "Joey", phone_number: "+19149074672", image_url: "https://www.cheatsheet.com/wp-content/uploads/2019/10/matt-le-blanc.jpg", date_last_outreach: Time.now, priority: "Medium", user: calvin)
Friend.create(name: "Monica", phone_number: "+19149074672", image_url: "https://image.insider.com/5c8279ebeb3ce821ef1247a2?width=1100&format=jpeg&auto=webp", date_last_outreach: Time.now, priority: "Medium", user: calvin)
Friend.create(name: "Ross", phone_number: "+19149074672", image_url: "https://i.ytimg.com/vi/1HkqeORgn_U/maxresdefault.jpg", date_last_outreach: Time.now, priority: "Low", user: calvin)
Friend.create(name: "Phoebe", phone_number: "+19149074672", image_url: "https://i.pinimg.com/originals/4a/b6/c2/4ab6c2362e2e32866b8f1094175e246d.jpg", date_last_outreach: Time.now, priority: "Low", user: calvin)
Friend.create(name: "Janice", phone_number: "+19149074672", image_url: "https://mtv.mtvnimages.com/uri/mgid:ao:image:mtv.com:221550?quality=0.8&format=jpg&width=1440&height=810&.jpg", date_last_outreach: Time.now, priority: "Medium", user: calvin)
Friend.create(name: "Gunther", phone_number: "+19149074672", image_url: "https://i0.wp.com/metro.co.uk/wp-content/uploads/2019/04/gunther2-0c0e.png?quality=90&strip=all&zoom=1&resize=644%2C396&ssl=1", date_last_outreach: Time.now, priority: "Low", user: calvin)

0 comments on commit 6bc2781

Please sign in to comment.