CLI
After adding entity or custom-field declarations in a module, synchronize them with the database. Check the installed definition before diagnosing a missing field in a form.
yarn mercato entities install reads custom entity definitions from every enabled module and installs them for the desired scope. It is typically executed after yarn db:migrate or any time module metadata changes.
yarn mercato entities install [--tenant <tenantId>] [--global] [--no-global] [--dry-run] [--force]
Aliases: --tenantId for --tenant, --dry for --dry-run.
| Option | Description |
|---|---|
--tenant <id> | Limit synchronization to a single tenant. |
--global | Process only global (tenant-less) definitions. When set, omitting --no-global is recommended. |
--no-global | Skip global definitions, applying changes only to tenant-specific entries. Cannot be combined with --global. |
--dry-run | Log actions without persisting changes. Output stats are prefixed with [dry-run]. |
--force | Reinstall even when definitions appear up to date (useful after manual edits). |
installCustomEntitiesFromModules, which compares module metadata with stored CustomEntity and CustomFieldDef rows.Sync complete: processed=6, updated=2, fieldsChanged=5, skipped=1. When --dry-run is active the prefix becomes Dry-run.Install definitions for every tenant plus global scope:
yarn mercato entities install
Dry-run the sync for a specific tenant:
yarn mercato entities install --tenant 81c3b8b0-6f06-44f6-9c22-12c0d9ec3c63 --dry-run
Install only global definitions (no tenant overrides):
yarn mercato entities install --global
Cannot combine --global with --no-global and exits when incompatible options are supplied.entities arrays or ce.ts metadata and that yarn generate has been run recently.Previous: mercato entities decrypt-database · Next: Module CLI commands