If you have ever tried to rename a table or column in Directus, you already know the pain: Directus treats a rename as a structural change. Relations, permissions, automations, and your entire application can break instantly. For years, this was one of the most-requested features in the Directus community — and there was no built-in solution, and no reliable extension available.
We ran into this exact problem on nearly every project we delivered to clients. So we built a solution and released it as a free, open-source extension for everyone.
The Problem: Directus Has No Safe Rename
When you rename a collection or field in Directus, the system creates a new table or column and leaves the old one behind. All your foreign key relations, custom API endpoints, presentation settings, and dependent functionality are broken. Manually fixing these references is error-prone and time-consuming — especially on large databases with dozens of interconnected collections.
Introducing: Directus Safe Rename Extension
Our directus-extension-safe-rename is a free, open-source Directus extension that allows you to safely rename collections and fields. It handles all the internal references, relation updates, and permission mappings automatically.
What It Does
The extension ensures that when you rename a collection or field:
- All foreign key relations are updated to point to the new name
- Permissions and policies are preserved
- Custom endpoints and automations continue to work
- Existing data is migrated safely with zero loss
- System collections and critical fields are protected from accidental renames
Why We Built This
We build custom solutions on Directus for clients across Europe. As our projects grew more complex, the lack of a safe rename feature became a serious bottleneck. Imagine renaming a collection in a live system where 50+ tables depend on it — manually updating every reference is not just time-consuming, it is dangerous.
We checked Directus GitHub issues, community forums, and Discord. This was one of the most-requested features. So we decided to solve it properly and give the solution back to the community.
Installation
The extension installs like any other Directus extension:
npm install directus-extension-safe-renameThen restart your Directus instance. The extension appears in your admin panel under Extensions, and the rename feature is available from collection and field settings.
Full installation instructions, usage examples, and screenshots are on the GitHub repository.
Who Is This For?
Any Directus developer, agency, or team that has ever been afraid to rename a collection because it would break everything downstream. If you maintain complex multi-collection setups where renaming is risky, this extension is for you.
Contributing
The extension is MIT-licensed and open for contributions. Whether you are a Directus power user or just starting out, your input — bug reports, feature requests, or pull requests — helps make this better for everyone.
- GitHub: github.com/contensu/directus-extension-safe-rename
- npm:
directus-extension-safe-rename - License: MIT
About Contensu
We are a custom software development agency that builds CRM systems, websites, internal tools, and learning platforms for small and medium businesses across Europe. We also build and maintain open-source tools that solve real problems we encounter in our daily work.
If you need custom software built, get in touch.
Interested in a solution like this?
Tell us about your business needs. We'll scope a custom solution with a fixed price.
Get a free quote →