Extending
The module has no interface of its own to implement: it reads what the rest of the project already declares. This page explains what it picks up and how other modules use it.
Supported extension boundary
Use registered database schemas, the Table watch trigger, configuration and deep links documented here. The runtime's root barrel also re-exports its page and route classes; those exports exist, but they do not define a separate extension SDK or a supported subclassing contract. Do not register those controllers again or depend on their implementation methods. Declare your own pages through @antelopejs/interface-dms and tables through the database interfaces instead.
Your tables appear on their own
Every schema registered through @antelopejs/interface-database-decorators appears in the console, with its tables, columns, indexes and relations. There is nothing to add for the console:
import { BasicDataModel, Field, Index, RegisterSchema, RegisterTable, Table } from "@antelopejs/interface-database-decorators";
@RegisterTable("posts", "blog")
export class Post extends Table {
@Field("string") declare _id: string;
@Index() @Field("string") declare title: string;
@Field("string") declare author: string;
}
export class PostModel extends BasicDataModel(Post, "posts") {}
export async function start(): Promise<void> {
await RegisterSchema("blog");
}
Keep the table in src/db/posts.table.ts, import it from your module entry, and merge RegisterSchema("blog") into that entry's start() hook. @Field declares each column's storage type; @Index alone does not declare a field. Each instance of the schema (the default one, one per tenant, one per region) is listed in the instance pickers. Columns marked hashed, localized or encrypted carry a modifier badge.
schemaLabels rather than renaming it: schema IDs are part of the stored data.Table watch automation trigger
When @antelopejs/dms-automation is loaded, the module registers the Table watch trigger (database.table-watch). It fires a procedure on each insert, update or delete in a table, from the database change feed. Without the automation module, the registration is a silent no-op.
| Config | Type | Required | Description |
|---|---|---|---|
schema | string | yes | Registered schema ID, such as shop. |
table | string | yes | Table name inside the schema. |
eventTypes | ("insert" | "update" | "delete")[] | no | Change types to fire on. Omit it for all three. |
Each event passes this output to the procedure:
| Field | Type | Description |
|---|---|---|
type | "insert" | "update" | "delete" | The change. |
old | object | null | The row before the change: null on insert, possibly only the primary key when the store keeps no pre-image. |
new | object | null | The row after the change: null on delete. |
schema, table | string | Where the change happened. |
at | string (date-time) | When the module received it. |
Roles and components
Each block of the module's pages carries .meta({ name, icon, description }), so the DMS role editor lists them and lets you hide one per role: the connection card, the schema cards, the largest tables, the recent queries, the table list, the inspector, the diagram, the data browser and the query console. The pages themselves stay reserved to the platform owner.
Link to the console
The pages read their selection from the URL, so any page, notification or row action can deep-link into the console:
| Link | Opens |
|---|---|
/modules/database/schemas?record=<schema>::<table> | The table inspector |
/modules/database/diagram?schema=<schema>&table=<table> | The diagram, focused on a table |
/modules/database/data?schema=<schema>&table=<table> | The table in the data browser |
/modules/database/query?schema=<schema>&table=<table> | The query console on that table |
Add instance=<name> for a non-default instance, or instance=all for every instance.
Frontend components
The module ships a Vue 3 frontend module registered under the DmsDatabase component prefix (DmsDatabaseDataBrowser, DmsDatabaseQueryConsole, DmsDatabaseSchemaDiagram, DmsDatabaseTableInspector, DmsDatabaseConnectionStatus). They are built for the module's own pages and backed by owner-only routes under /api/database: they are not a public API for other modules.