-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add import/export endpoints #2927
Comments
Dear Directus maintenance team, as mentioned here directus/v8-archive#31 (comment) , and I/we too are looking out for any such feature if directus can provide to migrate the schema from one environment to stage/PROD etc. Let us/me know once you release this feature. |
@prasadbandur Keep an eye on this issue 🙂 Once it's closed, it's merged into main and you can expect it in the first upcoming release 👍 |
It would be really nice if the schema export would be in a good format for version control systems like git. I don't know if it is in scope, but it would be really cool to be able to kind of "migrate" an existing schema to a newer one. Or is it somehow already possible? |
@aiomaster I miss this feature very much. Some plain JSON/JS code to control both schema and presentation within admin UI would be really nice. Strapi has it (a bit complicated, but flexible, I guess) — you can design your collections in UI and then tweak/change/reuse it. Keystone, Payload - these are simply 'code/config first', so no 'model builder' available, just an example what the exported configs could look like. In Payload config files control both collections/fields (collection tables in Directus) and their behaviour: permissions, appearance in admin UI etc. (i.e. corresponding records in directus_* tables), . The only 'source of truth' in Directus is the database. You can't easily track changes, find and resolve inconsistencies, test, share or reuse parts of its' schema etc. Some kind of solution to this would be really useful even for an "App dashboard for managing SQL database content", and Directus is already much more than that. @rijkvanzanten Please clarify it's out of scope. I found this comment from 2018. Anything new since then? |
Currently the only way of inputting information is by using the UI? At the moment I cannot "import", say, a XLS file into the database so the information gets loaded into the respective Collection? |
@adrchen Hard no! You can insert it directly into the database, and it'll show up and work with Directus as expected 👍🏻 |
Also, you can use the API (or SDK)... which is not UI, and we're actively working on the |
Thanks for the reply, @rijkvanzanten & @benhaynes . Could something like this work (I'll also try from my side)? Also, any chance this is on Directus roadmap? Being able to import information into Collections done directly thru the UI. |
This exactly should work just fine 🙂 I personally use TablePlus to modify my databases, but DBeaver is a perfectly fine tool too 👍🏻
Yes absolutely. We already have the functionality to export to a file, adding a way to "mass import" from those files it the next iteration on that 👍🏻 As a matter of fact, it's such an important feature to us that it's one on the list of required things before we want to release 9.0.0 |
Quick question: Is it really just possible to straightup dump the database and reimport it (as SQL dump for example) or is there additional data Directus stores on the collections like sorting keys, etc? Thanks for this amazing project, it's hard (not to say impossible) to find anything comparably clean yet extensible! |
@geisterfurz007 Thank you! Yes, a database dump has everything you need (except your asset files). |
The export endpoint allows you to export the output of multiple endpoints at the same time. This effectively allows you to export schema and data of the installation. Subsequently, the import endpoint should be able to intake this data and process it through the regular services, as if they were separate requests.
This allows you to move schema and/or data from/to different Directus installation, like staging to production
The text was updated successfully, but these errors were encountered: