Configuration: Data
Pakyow provides the following environment config options for data:
data.silent
: Iftrue
, logging is disabled across all data sources. Default:true
data.auto_migrate
: Iftrue
, data sources will be auto migrated on boot. Default:true
;false
in productiondata.auto_migrate_always
: Array of connection names that will always be auto migrated. Default:[:memory]
data.default_adapter
: Name of the adapter to use when unspecified in a data source. Default::sql
data.default_connection
: Name of the connection to use when unspecified in a data source. Default::default
data.migration_path
: Where database migration files live. Default:"{root}/database/migrations"
Subscriptions
Pakyow provides the following environment config options for data subscriptions:
data.subscriptions.adapter
: What adapter to back subscriptions with. Default::memory
;:redis
in productiondata.subscriptions.adapter_options
: Options passed to the subscription adapter. Default:{}
;redis_url: ENV["REDIS_URL"] || "redis://127.0.0.1:6379", redis_prefix: "pw"
in production
Example Usage
Data config lives in config/environment.rb
:
Pakyow.configure do
config.data.option = value
end