Migrations & version control
@mangalaman93 is already working on this.
Since Jun 17, 2025.
- Dominant language
- Go
- Stars
- 21.8k
- Forks
- 1.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 9
Description
Dear DGraph Team,
I hope you're doing well! I’m excited to introduce dmigrate (https://github.com/vishenosik/dmigrate), a Golang library designed to manage schema versioning and migrations for DGraph databases.
Problem Addressed
DGraph currently lacks a built-in way to:
- Track and apply schema changes incrementally (like goose lib for SQL).
- Roll back schema changes safely.
- Maintain a versioned history of schema states.
dmigrate solves this by providing a simple, programmatic way to handle schema evolutions in a structured manner.
It's only version v0.0.1 in release and it only has Up migrations features.
Key Features
✅ Declarative Schema Migrations – Define schema changes in GQL files and apply them sequentially.
✅ Version Control – Track migrations with timestamps or incremental versions.
✅ Integration-Friendly – Works alongside existing DGraph clients.
✅ Minimal Dependencies – Lightweight, easy to embed in applications.
Future Features
🧪Safe Rollbacks – Optional down-migrations for reverting changes. (work in progress)
🧪Deletion Up Migrations - migrations able to delete schema elements.
Why This Library?
- Adoption Pain Point: Many teams manually manage DGraph schema changes, leading to drift and inconsistencies.
- DevOps/CI/CD Friendly: Enables automated schema updates in deployment pipelines.
- Complementary to DGraph: Could be an official/community-maintained tool.
I’d love your feedback on:
- Code Review – Could the DGraph team evaluate the library for potential improvements?
- Adoption – Would this fit as an official DGraph tool or community-supported project?
- Roadmap Alignment – Are there planned DGraph features that dmigrate should integrate with?
Looking forward to your thoughts!
Best regards,
[Nik]
[nikitakuznetcov618@gmail.com / github.com/vishenosik ]
[Repository: github.com/vishenosik/dmigrate]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.