introspectSchema
introspectSchema(
schema,tableOverrides?):AdminTableMeta[]
Defined in: packages/admin/src/introspect.ts:128
Introspect a Drizzle schema and produce AdminTableMeta for each visible table.
Reads every SQLiteTable in the schema, extracts column types, foreign keys,
and primary keys, then applies user-provided TableOverrides. Auth-internal
tables (session, account, verification, passkey) are auto-excluded unless
you explicitly provide overrides for them.
Use this directly when you need server/client code splitting (the result is
JSON-serializable minus the drizzleTable references, which stay on the server).
Parameters
Section titled “Parameters”schema
Section titled “schema”Record<string, unknown>
Your Drizzle schema object (e.g., import * as schema from "~/schema").
tableOverrides?
Section titled “tableOverrides?”Record<string, TableOverrides>
Optional per-table display and behavior overrides, keyed by table name.
Returns
Section titled “Returns”An array of AdminTableMeta sorted alphabetically by table name.
Example
Section titled “Example”import { introspectSchema } from "@cfast/admin";import * as schema from "~/schema";
const tableMetas = introspectSchema(schema, { posts: { label: "Blog Posts", listColumns: ["title", "createdAt"] },});