-
-
Notifications
You must be signed in to change notification settings - Fork 186
chore: Allow schema configuration #809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ test: | |
| postgres: | ||
| <<: *default | ||
| adapter: postgres | ||
| search_path: public | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we shouldn't need to explicitly specify here, if it defaults to public |
||
| docker_postgres: | ||
| adapter: postgres | ||
| database: postgres | ||
|
|
@@ -76,4 +77,4 @@ development: | |
| production: | ||
| default: | ||
| <<: *default | ||
| adapter: postgres | ||
| adapter: postgres | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ def self.included(anyway_config) | |
| database_port: nil, | ||
| database_url: nil, | ||
| database_sslmode: nil, | ||
| database_schema: "public", # Default to public schema | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does a default value need to be provided here? If one isn't provided, surely it defaults to public to preserve existing behaviour. can this attr be set to |
||
| sql_log_level: :none, | ||
| sql_log_warn_duration: 5, | ||
| sql_enable_caller_logging: false, | ||
|
|
@@ -104,7 +105,8 @@ def database_configuration_from_parts | |
| password: database_password, | ||
| host: database_host, | ||
| database: database_name, | ||
| port: database_port | ||
| port: database_port, | ||
| search_path: database_schema | ||
| }.compact | ||
| end | ||
| private :database_credentials | ||
|
|
@@ -118,6 +120,7 @@ def database_configuration_from_url | |
| host: uri.host, | ||
| database: uri.path.sub(/^\//, ""), | ||
| port: uri.port&.to_i, | ||
| search_path: database_schema | ||
| }.compact | ||
| end | ||
| private :database_configuration_from_url | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why
search_path, and notschemahere? same for other places it applies across the other files