-
Notifications
You must be signed in to change notification settings - Fork 11
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
Feature Request: Add support to Seed Data to the Database #4
Comments
@fauna-brecht, If I add an FQL script in a migrations folder to run together with some create/update scripts to populate data in some docs, would that run? Or the tool only execute FQL with UPDATE/CREATE and so on? |
It would not work, we would need a different approach for data. I still think seed data doesn't really fit the migrations problem. |
Indeed this is more like a data migration than seed but should be linked with some DB migration and coupled with specifics UDF/Index. |
Problem
I know the focus of the lib is to support migration schemas, and does NOT intended to support any kind of data migration.
But today once my database is created for the first time I seed some data, which was part of my migration scripts once using faunadb-migrate lib.
Request:
Support Seed Data to be part of the migration scripts, in this case is not possible to auto-generated a down script automatically so my propose is to support seed data scripts where the up and down scripts should be typed by the developer.
Current Workaround:
Based on Fwitter I create a populate scripts this can support my data seed, this force me to keep out of my CI/CD pipeline for simplicity and the developers execute it manually if the database was created by the first time.
Here the scripts if someone would like to use:
yarn populate FAUNA_ADMIN_KEY
The text was updated successfully, but these errors were encountered: