TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tailor-platform/sdk/llms.txt
Use this file to discover all available pages before exploring further.
tailordb truncate command deletes all records from one or more TailorDB tables. This is useful for clearing test data, resetting development environments, or preparing tables for fresh data imports.
Usage
Arguments
Type names to truncate (e.g.,
User Post Comment). The namespace is automatically detected from your config.Options
Workspace ID for the operation
Workspace profile to use
Path to SDK config file
Skip confirmation prompts (useful for scripts and CI/CD)
Truncate all tables in all namespaces
Truncate all tables in the specified namespace
Truncation Modes
You must specify exactly one of the following:Truncate All Tables
Truncate all tables in all namespaces defined in your config:truncate all to confirm (unless --yes is used).
Truncate by Namespace
Truncate all tables in a specific namespace:truncate <namespace-name> to confirm (unless --yes is used).
Truncate Specific Types
Truncate one or more specific types:yes to confirm (unless --yes is used).
Examples
Truncate all tables with confirmation
Truncate all tables (skip confirmation)
Truncate namespace with confirmation
Truncate specific types
Truncate specific types (skip confirmation)
Use with custom config file
Confirmation Behavior
The confirmation prompt varies based on the operation:--all: Requires typingtruncate allto confirm--namespace: Requires typingtruncate <namespace-name>to confirm- Specific types: Requires typing
yesto confirm
--yes flag to skip all confirmation prompts.
Implementation Details
The truncate command:- Validates that exactly one truncation mode is specified
- Loads the TailorDB configuration from your config file
- For specific types, automatically detects which namespace contains each type
- Displays a confirmation prompt (unless
--yesis used) - Calls the TailorDB API to delete all records from the specified tables
Truncating a table only removes data - the table schema and structure remain intact.
See Also
- tailordb migration - Manage schema migrations
- apply - Deploy application changes