Megamono

DOCUMENTATION

On this page
  1. When to use it
  2. Usage
  3. Options
  4. Next steps

database

Create or adopt a named database project

When to use it

Create a Prisma or Drizzle database project, or bring an existing Prisma schema into your workspace. Existing schemas stay where they are unless you request relocation. If you move one, update client imports, build inputs, and migration commands together. For a new compiled client library, follow Build and consume a Prisma client.

Usage

bash
npm exec -- nx generate @megamono/plugin:database --dry-run

Replace angle-bracket placeholders with reviewed values. Nx's --dry-run previews generator writes; remove it only after reviewing the plan. Examples use npm; use your workspace's package manager if it differs.

Options

Use these options with @megamono/plugin:database. Nx uses the camelCase names shown here; the CLI reference describes command-line aliases. Some options are required only for particular choices.

OptionRequiredTypeDefaultDescription
nameNostring—Repository-defined logical database name.
adapterNostring—Database schema and persistence adapter to scaffold. Allowed: "prisma", "drizzle".
directoryNostring—Workspace-relative project root; defaults to libs/<adapter>/<name>.
projectNostring—Nx project name; defaults to <scope>-<adapter>-<name>.
targetNostring—Workspace-relative Playstack schema artifact destination.
schemaNostring—Existing workspace-relative Prisma schema file to adopt without moving it.
relocateNobooleanfalseMove an existing Prisma schema directory into the selected context project after a conflict-free dry run.
clientOutputNostring—Optional project-relative generated client output, such as src/generated, during relocation or fresh buildable Prisma generation.
buildableNobooleanfalseCreate a fresh Prisma 7 client library with ESM exports and a generate-then-compile build. Existing schemas and libraries are never converted.
scopeNostring——
interactiveNobooleantrue—
yesNobooleanfalse—
dryRunNobooleanfalse—

Next steps

Review changed files and run the affected project's checks. For options that accept structured values, run the generator's --help or consult the schema in the installed package.

Megamono

One repository system for the applications, tools, and people building together inside it.

BUILD

Get startedGuidesDocumentationCLI referenceCapabilitiesInference

SOURCE

GitHub ↗

MIT licensed

© 2026 Megamono

By

Commune Software