-
-
Notifications
You must be signed in to change notification settings - Fork 8
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 a seed
command to create and update data in custom collections
#48
Comments
Howdy @EdouardDem, I've got a use case for this feature and was wondering if this is progressing. I understand that the Open Source code is the best effort, and I appreciate the work that has been done with the extension thus far. I mainly want to make sure anything I 'hack up' myself isn't wasted, as you've got some updates to the |
Hello @craftyshaun. I've been very busy these days and other priorities have come up. The difficult wayIn this case, the
The simple methodThis approach is similar to the [seed in Prisma] (https://www.prisma.io/docs/orm/prisma-migrate/workflows/seeding). Initially, I'll go for the easy way. I can implement this solution in the next 10 days. Later, we can implement the other solution, if enough people request this behavior. What exactly do you need? |
Hello, @EdouardDem understand about priorities...
My use case is some developers have created some 'static' data in a staging database that we now need to get to prod. This 'static' data is lookup data. An example is a list of banned words for a community forum. They wish to execute point in type syncs from dev -> production for an initial starting point.
I'm all for KISS, so I'd say it could work, with a tiny caveat. We try to implement some way to 'dump' a collection from directus into an importable format. Understanding that if the collection has a 'relation' to another table, it's up to the 'user' to import these in the right order. So, we ignore numbers 2 and 3 above with an at your own peril' type caveat. Stepping back from this and treating directus as 'the data layer,' the Prisma definition sounds a lot like a traditional database seed (or migration), which, IMHO, belongs alongside the application code (not the database tooling). If it's easier for my use case (which may not be normal), I can write the migrations in the application code. Then, I can write some import/export tooling to update these static migrations.
The 'coolness' of this project is the diff/sync. I'd love to see this done with the data as well. Hence, I'm happy to do it manually so you can save energy for this 'complete' diff/sync. EDIT: Added my views on full sync |
Reported here: #1
Work in progress in this branch: https://github.com/tractr/directus-sync/tree/seed
The text was updated successfully, but these errors were encountered: