diff --git a/Gemfile b/Gemfile index 757c4fa..e80f2e9 100644 --- a/Gemfile +++ b/Gemfile @@ -6,8 +6,8 @@ ruby "3.1.2" # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" gem "rails", "~> 7.0.3", ">= 7.0.3.1" -# Use mysql as the database for Active Record -gem "mysql2", "~> 0.5", "> 0.5.5" +# Use Postgres as the database for Active Record +gem "pg", "~> 1.5.6" # Use the Puma web server [https://github.com/puma/puma] gem "puma", "~> 5.0" diff --git a/Gemfile.lock b/Gemfile.lock index c1fe9b1..902feb1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -119,7 +119,10 @@ GEM minitest (5.18.0) msgpack (1.5.6) multi_json (1.15.0) +<<<<<<< HEAD mysql2 (0.5.6) +======= +>>>>>>> b4f1356 (Move to psql) net-imap (0.2.3) digest net-protocol @@ -150,6 +153,7 @@ GEM parallel (1.22.1) parser (3.1.2.1) ast (~> 2.4.1) + pg (1.5.6) public_suffix (5.0.0) puma (5.6.5) nio4r (~> 2.0) @@ -253,9 +257,9 @@ DEPENDENCIES debug jbuilder multi_json (~> 1.15.0) - mysql2 (~> 0.5, > 0.5.5) octokit (~> 5.4) oj (~> 3.13) + pg (~> 1.5.6) puma (~> 5.0) rails (~> 7.0.3, >= 7.0.3.1) rails-controller-testing (~> 1.0) diff --git a/config/database.yml b/config/database.yml index 06f9ee6..85ef32e 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,16 +1,17 @@ default: &default - adapter: mysql2 + adapter: postgresql username: root - password: unipept + password: root pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> development: <<: *default - username: unipept - database: unipept + username: root + database: postgres # setup local port forwarding for this to work host: 127.0.0.1 - port: 3306 + port: 5432 + schema_search_path: "unipept" # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake".