Skip to content

Commit

Permalink
Merge pull request #173 from dxw/database
Browse files Browse the repository at this point in the history
Define database names in config rather than ENVs
  • Loading branch information
jdudley1123 authored Dec 16, 2024
2 parents 1f083ea + 3a7a673 commit 485c251
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
ROLLBAR_ACCESS_TOKEN=ROLLBAR_ACCESS_TOKEN
ROLLBAR_ENV=development

DATABASE_URL=postgres://postgres@localhost:5432/air-text-development

# TODO: Replace `example.com` with the canonical hostname of the app
CANONICAL_HOSTNAME=example.com

Expand Down
3 changes: 0 additions & 3 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
#
# Reference=https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use

DATABASE_URL=postgres://postgres@localhost:5432/air-text-test
HOSTNAME=localhost

CERC_FORECAST_API_HOST_URL=https://cerc.example.com
CERC_FORECAST_API_KEY=SECRET-API-KEY
CERC_FORECAST_API_CACHE_LIMIT_MINS=60
Expand Down
2 changes: 2 additions & 0 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ default: &default
pool: <%= Integer(ENV.fetch('RAILS_MAX_THREADS') { 5 }) %>

development:
database: air-text_development
<<: *default

test:
database: air-text_test
<<: *default

production:
Expand Down
2 changes: 0 additions & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
t.integer "cerc_type", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.float "latitude"
t.float "longitude"
t.uuid "zone_group_id"
t.index ["cerc_id"], name: "index_zones_on_cerc_id", unique: true
t.index ["zone_group_id"], name: "index_zones_on_zone_group_id"
Expand Down

0 comments on commit 485c251

Please sign in to comment.