Skip to content

Commit

Permalink
Enable verbose sql logs for staging too by default
Browse files Browse the repository at this point in the history
  • Loading branch information
fatkodima committed Jan 13, 2024
1 parent 0cff442 commit 39b8bf7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/configuring.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ To enable verbose sql logs:
config.verbose_sql_logs = true
```

This feature is enabled by default in a production Rails environment. You can override this setting via `ONLINE_MIGRATIONS_VERBOSE_SQL_LOGS` environment variable.
This feature is enabled by default in a staging and production Rails environments. You can override this setting via `ONLINE_MIGRATIONS_VERBOSE_SQL_LOGS` environment variable.

## Analyze Tables

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ OnlineMigrations.configure do |config|
# a better grasp of what is going on for high-level statements like add_column_with_default.
#
# Note: It can be overridden by `ONLINE_MIGRATIONS_VERBOSE_SQL_LOGS` environment variable.
config.verbose_sql_logs = defined?(Rails) && Rails.env.production?
config.verbose_sql_logs = defined?(Rails.env) && (Rails.env.production? || Rails.env.staging?)

# Lock retries.
# Configure your custom lock retrier (see LockRetrier).
Expand Down
2 changes: 1 addition & 1 deletion lib/online_migrations/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def target_version
# migration failure in production. This is also useful in development to get
# a better grasp of what is going on for high-level statements like add_column_with_default.
#
# This feature is enabled by default in a production Rails environment.
# This feature is enabled by default in a staging and production Rails environments.
# @return [Boolean]
#
# @note: It can be overridden by `ONLINE_MIGRATIONS_VERBOSE_SQL_LOGS` environment variable.
Expand Down

0 comments on commit 39b8bf7

Please sign in to comment.