Renaming a Directus collection shouldn't break your entire project

Hey everyone :waving_hand:

I ran into the collection renaming problem one too many times and finally decided to do something about it. Just released directus-extension-safe-rename — it lets you rename collections and fields straight from the UI and handles all the system table updates automatically in one atomic transaction.

It covers relations, permissions, presets, flows — pretty much everything. PostgreSQL tested, other DBs still untested (help welcome! :eyes:)

What gets updated automatically:

  • Collections & fields metadata

  • Relations (O2M, M2M, M2A)

  • Permissions & presets

  • Flows & operations & more

Install via Directus Marketplace or npm:

npm install @contensu/directus-extension-safe-rename

:package: NPM: https://www.npmjs.com/package/@contensu/directus-extension-safe-rename :laptop: GitHub: https://github.com/contensu/directus-extension-safe-rename

Still in beta so please backup your DB before using :folded_hands: Feedback and bug reports are super welcome — especially from anyone running MySQL, SQLite, or CockroachDB. Happy to answer any questions!

5 Likes