Skip to content

Commit

Permalink
makes postgres the dev database
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinW520 committed Nov 2, 2018
1 parent 6e2ee46 commit 8410a9f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -9,7 +9,7 @@ ruby '2.5.3'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
gem 'pg'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Expand Up @@ -174,6 +174,7 @@ GEM
terrapin (~> 0.6.0)
paranoia (2.4.1)
activerecord (>= 4.0, < 5.3)
pg (1.1.3)
public_suffix (3.0.3)
puma (3.12.0)
rack (2.0.5)
Expand Down Expand Up @@ -306,7 +307,6 @@ GEM
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.13)
state_machines (0.5.0)
state_machines-activemodel (0.5.1)
activemodel (>= 4.1, < 6.0)
Expand Down Expand Up @@ -351,6 +351,7 @@ DEPENDENCIES
coffee-rails (~> 4.2)
jbuilder (~> 2.5)
listen (>= 3.0.5, < 3.2)
pg
puma (~> 3.11)
rails (~> 5.2.1)
sass-rails (~> 5.0)
Expand All @@ -359,7 +360,6 @@ DEPENDENCIES
solidus_auth_devise
spring
spring-watcher-listen (~> 2.0.0)
sqlite3
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
Expand Down
23 changes: 5 additions & 18 deletions config/database.yml
@@ -1,25 +1,12 @@
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
#
default: &default
adapter: sqlite3
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000
adapter: postgresql
encoding: unicode
pool: 5

development:
<<: *default
database: db/development.sqlite3
database: spectrum-reg_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

production:
<<: *default
database: db/production.sqlite3
database: spectrum-reg_test
5 changes: 4 additions & 1 deletion db/schema.rb
Expand Up @@ -12,6 +12,9 @@

ActiveRecord::Schema.define(version: 2018_11_02_023650) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"

create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
Expand Down Expand Up @@ -842,7 +845,7 @@
t.index ["deleted_at"], name: "index_spree_stock_items_on_deleted_at"
t.index ["stock_location_id", "variant_id"], name: "stock_item_by_loc_and_var_id"
t.index ["stock_location_id"], name: "index_spree_stock_items_on_stock_location_id"
t.index ["variant_id", "stock_location_id"], name: "index_spree_stock_items_on_variant_id_and_stock_location_id", unique: true, where: "deleted_at is null"
t.index ["variant_id", "stock_location_id"], name: "index_spree_stock_items_on_variant_id_and_stock_location_id", unique: true, where: "(deleted_at IS NULL)"
end

create_table "spree_stock_locations", force: :cascade do |t|
Expand Down

0 comments on commit 8410a9f

Please sign in to comment.