Skip to content

Commit 4309b06

Browse files
committed
Update default_target_environment optional config message
1 parent f83d9a8 commit 4309b06

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

sqlmesh/cli/project_init.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,18 @@ def _gen_config(
131131
auto_apply: true # Apply changes automatically
132132
133133
# --- Optional: Set a default target environment ---
134-
# default_target_environment: dev_{{ env_var('USER', 'your_name') }}
134+
# This is intended for local development to prevent users from accidentally applying plans to the prod environment.
135+
# It is a development only config and should NOT be committed to your git repo.
136+
# https://sqlmesh.readthedocs.io/en/stable/reference/configuration/?h=config#environments
137+
138+
# Uncomment one of the following lines (depending on your computer's OS) to use a default target environment derived
139+
# from your system environment variable USER/USERNAME.
140+
# default_target_environment: dev_{{ env_var('USER') }} # Linux/MacOS
141+
# default_target_environment: dev_{{ env_var('USERNAME') }} # Windows
135142
136143
# Example usage:
137-
# export USER=your_name
138-
# sqlmesh plan # Resolves to: sqlmesh plan dev_your_name
139-
# sqlmesh plan prod # To apply changes to production
144+
# sqlmesh plan # Automatically resolves to: sqlmesh plan dev_yourname
145+
# sqlmesh plan prod # Specify `prod` to apply changes to production
140146
"""
141147

142148
return default_configs[template] + (flow_cli_mode if cli_mode == InitCliMode.FLOW else "")

0 commit comments

Comments
 (0)