From 7ad231f6eedd8c173a78b9b85e745f2cc50d3136 Mon Sep 17 00:00:00 2001 From: Yury Dymov Date: Sun, 7 Aug 2016 10:05:24 +0000 Subject: [PATCH] sqlite3 > pg --- Gemfile | 3 +-- Gemfile.lock | 6 +++--- config/database.yml | 26 +++----------------------- config/environments/production.rb | 1 + 4 files changed, 8 insertions(+), 28 deletions(-) diff --git a/Gemfile b/Gemfile index 72eb7f0..d35af13 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.0.0' # Use sqlite3 as the database for Active Record -gem 'sqlite3' +gem 'pg' # Use Puma as the app server gem 'puma', '~> 3.0' @@ -38,6 +38,5 @@ group :development do gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' end - # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] diff --git a/Gemfile.lock b/Gemfile.lock index c288a5b..6a7bb4b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,5 +1,5 @@ GEM - remote: http://rubygems.org/ + remote: https://rubygems.org/ specs: actioncable (5.0.0) actionpack (= 5.0.0) @@ -97,6 +97,7 @@ GEM oauth2 (~> 1.0) omniauth (~> 1.2) orm_adapter (0.5.0) + pg (0.18.4) pkg-config (1.1.7) puma (3.6.0) rack (2.0.1) @@ -143,7 +144,6 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sqlite3 (1.3.11) thor (0.19.1) thread_safe (0.3.5) tzinfo (1.2.2) @@ -164,12 +164,12 @@ DEPENDENCIES listen (~> 3.0.5) omniauth omniauth-github + pg puma (~> 3.0) rack-cors rails (~> 5.0.0) spring spring-watcher-listen (~> 2.0.0) - sqlite3 tzinfo-data BUNDLED WITH diff --git a/config/database.yml b/config/database.yml index 1c1a37c..ed64cd0 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,25 +1,5 @@ -# SQLite version 3.x -# gem install sqlite3 -# -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' -# default: &default - adapter: sqlite3 + adapter: postgresql + encoding: unicode pool: 5 - timeout: 5000 - -development: - <<: *default - database: db/development.sqlite3 - -# 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 + \ No newline at end of file diff --git a/config/environments/production.rb b/config/environments/production.rb index c7d8dfe..94071fb 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -72,6 +72,7 @@ logger.formatter = config.log_formatter config.logger = ActiveSupport::TaggedLogging.new(logger) end + # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false