System Database URL (#442)
This PR enables configuring DBOS with just a system database, like this:
```python
config: DBOSConfig = {
"name": "dbos-starter",
"system_database_url": os.environ.get("DBOS_SYSTEM_DATABASE_URL"),
}
DBOS(config=config)
```
If using transactions, the application database can be configured
separately:
```python
config: DBOSConfig = {
"name": "dbos-starter",
"system_database_url": os.environ.get("DBOS_SYSTEM_DATABASE_URL"),
"application_database_url": os.environ.get("APP_DATABASE_URL"),
}
DBOS(config=config)
```
This is fully backwards-compatible—the old way of configuring DBOS
with just `database_url` (which points to an application database, with
the system database name suffixed with `_dbos_sys` if not provided) is
still supported, though it will be removed in a future major release.
The client interface and CLI are updated similarly.
The client can now be created with just a system database URL:
```python
client = DBOSClient(
system_database_url=os.environ.get("DBOS_DATABASE_URL"),
)
```
All CLI commands now accept a `--sys-db-url` parameter. P
Peter Kraft committed
c560d0b7ba895ad85d8207d1be5384b67f318c26
Parent: 8629cb2
Committed by GitHub <noreply@github.com>
on 8/28/2025, 12:41:12 AM