Skip to content

Commit 8669b06

Browse files
committed
fix: scaffold explicit [project] block
1 parent 17d2b23 commit 8669b06

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

cmd/dryrun/init.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,18 +200,22 @@ func scaffoldConfig(configPath string) error {
200200
return err
201201
}
202202
profileName := filepath.Base(cwd)
203-
content := fmt.Sprintf(`[default]
203+
content := fmt.Sprintf(`[project]
204+
id = %q
205+
206+
[default]
204207
profile = %q
205208
206209
[profiles.%s]
207210
schema_file = ".dryrun/schema.json"
211+
# database_id = %q # defaults to profile name; override to e.g. "auth", "billing"
208212
209213
# [profiles.dev]
210214
# db_url = "${DATABASE_URL}"
211215
212216
# [conventions]
213217
# See: https://boringsql.com/dryrun/docs/dryrun-toml
214-
`, profileName, profileName)
218+
`, profileName, profileName, profileName, profileName)
215219
if err := os.WriteFile(configPath, []byte(content), 0o644); err != nil {
216220
return err
217221
}

0 commit comments

Comments
 (0)