Versioning & Status Management
Metabind uses a consistent versioning and status management system across Components, Content Types, and Content. All entities follow the same lifecycle pattern with minor variations in how they are published.Entity Status States
All entities can exist in one of five status states:Draft
Initial status for entities that have never been published.- Version is
null(no version number yet) lastPublishedVersionisnull- Working status where changes can be made freely
- Updates overwrite previous changes without creating versions
- Remains in draft until first publication
Modified
Status for published entities with unpublished changes.- Version is
null(working copy) lastPublishedVersioncontains the last published version number- Original published version remains unchanged and available
- Can discard changes to revert to published version
- Changes get new version number when published
Published
Entities that have been published and are immutable.- Has a version number (sequential integers: 1, 2, 3, etc.)
- Content is immutable and cannot be changed
- Must create a working copy to make changes (status becomes ‘modified’)
- Referenced by other entities or packages
Unpublished
Previously published entities made unavailable.Only available for Content Types and Content (not Components).
- Version number remains unchanged
- Not available for new usage but existing references maintained
- Can be re-published or edited (creates ‘modified’ working copy)
Deleted
Soft-deleted entities.- Preserves complete version history
- Maintains availability in existing packages/references
- Can be restored to draft or modified status
- Prevents inclusion in new packages or usage
Version Management Rules
| Rule | Description |
|---|---|
| Version Numbers | Sequential integers starting at 1 |
| Draft Entities | Have null version (no version number) |
| Published Versions | Are immutable and permanent |
| Version Creation | Only occurs during publication |
| Version History | All versions are preserved permanently |
| Package References | Components in packages cannot be deleted |
Publishing Flow
Creating a New Entity
- Starts in draft status with version
null - Can be modified freely without versioning
- First publication assigns version 1
Editing a Published Entity
- Creates working copy with status modified
- Working copy has version
null - Original published version remains available
- Next publication creates new version
Discarding Changes
- Only works for modified status (not draft)
- Reverts to last published version
- Cancels all unpublished changes
Rollback Process
- Creates new working copy from any previous version
- Does not modify existing versions
- New version created when published
- Preserves complete version history
Key Differences by Entity Type
| Entity | How Published | Can Be Unpublished | Version Trigger |
|---|---|---|---|
| Components | Via Package creation | No | Package inclusion |
| Content Types | Explicit publish action | Yes | Publish action |
| Content | Explicit publish action | Yes | Publish action |
Components
Components are published automatically when included in a Package:- No explicit “publish component” action
- Version assigned when package is created
- All draft/modified components in project are published together
Content Types & Content
Content Types and Content are published explicitly:- Requires explicit publish action
- Can be unpublished later
- Version assigned immediately on publish
Version History
All entities maintain complete version history:Best Practices
Use draft status for iteration
Use draft status for iteration
Keep entities in draft status while actively developing. This allows unlimited changes without creating version history clutter.
Create packages at logical milestones
Create packages at logical milestones
Since packages publish all components, create them at meaningful milestones rather than after every small change.
Use rollback for reverting content
Use rollback for reverting content
Instead of manually recreating old content, use the rollback endpoint to create a working copy from any previous version.
Don't delete components in use
Don't delete components in use
Components referenced by packages cannot be deleted. Use the deleted status to prevent future use while maintaining existing references.
