Schema Changelog
Changelog is a powerful new feature within dbdocs that lets you track and view all updates to your database schema. This guide aims to help you understand and make use of this feature as quick as possible.
How does it work?
Basically, Changelog automatically tracks every change you make to your database schema whenever you generate a new build.
It keeps a super detailed record of all the important stuff—like when you add
, remove
, or modify
things across different parts of your schema, such as tables
, fields
, relationships
, and more.
So, if you’re ever trying to figure out how your database has evolved or need to troubleshoot something, you’ve got all the info you need right there.
What changes are tracked?
Changes are determined with following structure: Operation + Entity
- Operation Types:
- Add
- Remove
- Modify
- Entity types:
- Schema
- Table
- Field
- Index
- ENUM
- Relationship
This hierarchical structure helps in grouping related changes, allowing for a more organized and clear breakdown of modifications.
Get started with Changelog
In last section, we all knew that changes are recorded after every new build. If you already used dbdocs for a while and perhaps made some build, you must already had your schema changes recorded in Changelog feature.
After build, you can view this new change by clicking the Changelog
button on the navbar of your doc. Here you can see the latest change you’ve just pushed and all the changes made before.
The Schema Changelog offers a comprehensive record for each change, including:
- Timestamp: The exact time when the change was made, helping you track the relative timing of modifications.
- Impact Summary: An overview of the change’s impact, detailing the number of entities affected and their counts.
- Detailed Breakdown: A thorough explanation of the specific changes, outlining the operations performed and the entities involved.
This structure ensures a clear and complete understanding of all modifications.
Changes breakdown
For each version, you might want to know specifically what changes have been made compared to previous one. In this case, you can look through changes detail to see what has actually changed.
In this case, you breakdown these changes by clicking the caret to collapse all the details, like what Fields or Index have been added or removed.
DBML code diff & tracing
You can view what changes in DBML code by clicking on detailed changes (like Added, Removed, and Modified line).
In this page, you can quickly see which changes have been made between each version in DBML code
Browse a past version of the project
You can access a past version of dbdocs projects by clicking on the “Book” icon in the Version Card.
Share a version
You might want to share this version with your colleagues for this discussion. If that’s the case, simply copy the URL and send to them
Rename a Version
When sharing or managing versions, you might want to give it a certain name to add more context for others, or for yourself. In this case, you can rename the version by clicking on the "pen" icon on the Version card.
FAQs
How about table notes, and field notes? Does it get tracked too?
No it doesn't. Schema Changelog, as its name suggested, only track schema changes like tables, relationship, fields, etc. Metadata like table notes or field notes are not recorded.
Why doesn't Schema Changelog use semantic versioning (major.minor.patch)?
With Schema Changelog, you have the flexibility to name versions as you see fit, including using semantic versioning (e.g., v1.1.0, v1.2.0). The default version names like "Version 1," "Version 2," etc., are automatically generated by the system to provide a basic sense of order when viewing versions. You can refer to this doc for more details on renaming a version: Rename a Version.
Do I need the paid plan to use this feature?
Currently, during beta phase, Changelog is free to use. We might consider moving it to Pro-only after the beta phase.