Reputation: 91610
I'm very familiar with SQL databases and a bunch of different NoSQL databases. I have setup a Docker Compose environment which starts Dgraph in standalone mode, since this is for local development only. I am using a volume for storage, but I'll likely be destroying/recreating this many times as I iterate.
For other databases as Docker images, it's fairly easy and straightforward to either copy in SQL files during a Docker build or to bind mount them into the running container so that on boot, the SQL is run, tables and indices are created, and fixture data is installed.
Dgraph does make it easy using Ratel (its web UI) to copy and paste in a schema and to run queries and mutations, but I want to create/alter schemas from a file on cluster start (ideally also on schema file change) and inject data idempotently as well.
How can I use fixtures for schema definitions and data with Dgraph to make development and testing of my application easier?
Upvotes: 0
Views: 13