You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: structured config with create_if_missing for non-existent database (#50)
When using structured database config, the `name` field was included in
the initial connection string. If the target database did not exist yet
(and a phase had `create_if_missing: true`), the connection failed before
the create phase could run.
Now initium detects this scenario and first connects to a bootstrap
database (`postgres` by default for PostgreSQL, no database for MySQL),
creates the missing database, then reconnects to the target for full
execution.
Adds `database.default_database` config field to override the bootstrap
database for environments where the default is not accessible.
Also adds integration tests for structured config edge cases:
special-character passwords, PostgreSQL options field, custom
default_database, and the create_if_missing regression.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
### Added
11
+
12
+
-`database.default_database` field for structured config: specifies which database to connect to during `create_if_missing` bootstrap. Defaults to `postgres` for PostgreSQL; MySQL connects without selecting a database. Useful when the user does not have access to the default `postgres` database.
13
+
14
+
### Fixed
15
+
16
+
- Structured database config now works with `create_if_missing: true` when the target database does not yet exist. Previously, the initial connection included the non-existent database name, causing an immediate connection error. Now initium connects to a bootstrap database first, creates the target, then reconnects. Fixes [#50](https://github.com/KitStream/initium/issues/50).
17
+
18
+
### Chores
19
+
20
+
- Added integration tests for structured database connectivity: special-character passwords (URL-reserved chars like `@`, `:`, `/`, `?`, `#`, `%`), PostgreSQL `options` field (`connect_timeout`), and `create_if_missing` with non-existent database ([#50](https://github.com/KitStream/initium/issues/50)).
| `database.default_database` | string | No | Database to connect to during `create_if_missing` bootstrap. Default: `postgres`for PostgreSQL, none for MySQL. |
127
+
| `database.tracking_table` | string | No | Name of the seed tracking table (default: `initium_seed`) |
0 commit comments