Documentation Index
Fetch the complete documentation index at: https://docs.dotportion.com/llms.txt
Use this file to discover all available pages before exploring further.
Schema Canvas
The Schema Canvas allows you to design database schemas visually in DotPortion—without writing database migration code. It provides a GUI-based schema builder, similar to tools like MongoDB Compass or ORM schema designers, but tightly integrated with workflows and database operations.What Is the Schema Canvas?
The Schema Canvas is a visual editor where you can:- Select a database (Platform DB or MongoDB)
- Create and manage collections
- Define fields and their constraints
- Maintain a clear data structure for your project
Supported Database Types
When opening the Schema Canvas, you can choose between:Platform Database
- Managed by DotPortion
- No external credentials required
- Best for quick setup and internal tooling
MongoDB Database
- Connects via MongoDB URL secret
- Works with your existing MongoDB clusters
- Full compatibility with MongoDB collections
Schema Canvas UI
🧩 Schema Canvas (UI Reference)
The canvas displays:
- Selected database
- List of collections
- Fields inside each collection
- Field-level configuration options
Creating a Collection
To create a new collection:- Select the database
- Click Add Collection
- Provide a collection name
- Start defining fields
users, orders, products).
Adding Fields
🧱 Field Configuration Panel (UI Reference)
Each field in a collection can be configured with the following options:
Field Options Explained
Field Name
Purpose:The key name used to store data in the document. Example:
- Lowercase
- Descriptive
- Consistent across collections
Type
Purpose:Defines the data type of the field. Common types include:
- String
- Number
- Boolean
- Date
- Object
- Array
Required
Purpose:Marks the field as mandatory.
- Enabled → field must be present
- Disabled → field is optional
Unique
Purpose:Ensures the field value is unique across the collection. Common use cases:
- Username
- External IDs
Index
Purpose:Creates an index on the field for faster queries. Indexes improve performance for:
- Frequent lookups
- Filtering
- Sorting
Default Value
Purpose:Sets a default value when no value is provided. Examples:
Description
Purpose:Adds documentation for the field. Descriptions help:
- Team members understand data intent
- Future maintenance
- Auto-generated docs
Visual Schema Editing Benefits
Using the Schema Canvas:- Reduces schema errors
- Improves team collaboration
- Makes data models self-documenting
- Aligns workflows with database structure
Relationship with Workflows
- Database Nodes respect schema definitions
- Field constraints guide workflow data shape
- Schema updates reflect immediately in DB operations
- Helps catch invalid data early
Best Practices
- Design schemas before building workflows
- Use
requiredanduniqueconstraints wisely - Add descriptions for clarity
- Index fields used in queries
- Keep schemas simple and intentional
Important Notes
- Schema changes affect live data
- Existing documents are not auto-migrated
- Deleting fields does not delete data automatically
- Always test schema changes in non-production environments
Summary
| Feature | Supported |
|---|---|
| Visual schema design | Yes |
| Platform Database | Yes |
| MongoDB Database | Yes |
| Field constraints | Yes |
| Indexing | Yes |
| Documentation | Yes |