Database
Configuration
Every option of the dms-database module, set in antelope.config.ts.
All options are optional. Set them in the config block of the dms-database entry of antelope.config.ts. The module reads them at start: restart the backend after a change.
For example, label the connection and distinguish billing data from tenant schemas:
antelope.config.ts
"dms-database": {
source: { type: "package", package: "@antelopejs/dms-database", version: ">=0.2.0 <1.0.0" },
config: {
driverLabel: "MongoDB 8.0",
schemaLabels: {
billing: { label: "Billing", color: "success" },
"tenant-*": { label: "Tenant data", color: "warning" },
},
},
},
These labels describe the connection; they do not select a driver or create schemas.
Options
| Option | Type | Default | Description |
|---|---|---|---|
driverLabel | string | none, the Overview shows — | Name of the database shown on the Overview's connection card, such as "MongoDB 8.0". The Database interface cannot discover the driver, so you supply it. |
schemaLabels | Record<string, { label: string; color?: Tone }> | built-in patterns | Labels and colours for schemas, keyed by exact schema ID or by a glob pattern containing *. |
Schema labels
A schema label is the coloured badge shown next to a schema in the pickers, cards and lists. The module resolves it in this order:
- An entry of
schemaLabelswhose key equals the schema ID. - The first entry of
schemaLabelswhose key contains*and matches the schema ID (*matches any run of characters). - A built-in pattern, matched on the start of the ID.
| Schema ID starts with | Label | Colour |
|---|---|---|
app, application | Application | info |
core | Core | primary |
global | Global | neutral |
staging | Staging | warning |
review, reviews | Reviews | secondary |
prod, production | Production | success |
color takes a DMS tone: primary, secondary, success, info, warning, error or neutral.
The module has no settings page: everything users change (diagram layouts, notes, saved queries) is data, stored in the module's own
dms-database schema.