Last active
December 8, 2019 13:24
-
-
Save nathan-appere/0cafc3afd6572c9eb4c38975b7a2253d to your computer and use it in GitHub Desktop.
Revisions
-
nathan-appere revised this gist
Dec 8, 2019 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,24 +20,24 @@ config_default_ops: &config_default_ops # ------------------------------------------------------------------------------ databases_config: &databases_config primary: adapter: nulldb primary_readonly: <<: *config_default_readonly primary_write: <<: *config_default_write primary_ops: <<: *config_default_ops # ------------------------------------------------------------------------------ # All ENVs behave the same way production: <<: *databases_config development: <<: *databases_config test: <<: *databases_config -
nathan-appere created this gist
Dec 8, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ config_default: &config_default adapter: <%= ENV['DATABASE_ADAPTER'] || 'postgresql' %> encoding: utf8 pool: <%= (ENV['DATABASE_POOL'] || ENV['MAX_THREADS'] || 5) %> # Readonly mode | expected privileges: [CONNECT, SELECT] config_default_readonly: &config_default_readonly <<: *config_default url: <%= ENV['DATABASE_URL_READONLY'] %> # Write mode | expected privileges: readonly_mode + [INSERT, UPDATE, DELETE] config_default_write: &config_default_write <<: *config_default url: <%= ENV['DATABASE_URL_WRITE'] %> # Operation mode | expected privileges: write_mode + [CREATE, REFERENCES, TRUNCATE, USAGE] config_default_ops: &config_default_ops <<: *config_default url: <%= ENV['DATABASE_URL_OPS'] %> # ------------------------------------------------------------------------------ generic_database_setup: &generic_database_setup primary: adapter: nulldb primary_readonly: <<: *default_readonly primary_write: <<: *default_write primary_ops: <<: *default_ops # ------------------------------------------------------------------------------ # All envs behave the same way production: <<: *generic_database_setup development: <<: *generic_database_setup test: <<: *generic_database_setup