How to make a seeder for a entity?
How to make a seeder for a entity? I don' want to to add it manually in the admin. Also can I manipulate the data as a file, at least locally?
7 Replies
Yes, you can edit SQLite file. However do maintain the relation consistency.
You can add data using API or directly injecting in db file using scripts.
Hello @MURO⚡ you can run
npm run manifest:seed
to seed all tables. Are you looking for something more specific ? Like a really custom seeder where you have your own values and logic ? If yes can you share some implementations (other tools/frameworks...) that you like ? Thank you@brunobuddy yes I would like to create a custom seeder for a specific entity, maybe we could have seed files with content like this:
seed-workexperience.yml ?
with content:
this would mean that all WorkExperience items have the same value right ? I think it can be coupled with a faker or something like that to generate dummy values
i mean multiple of those, this is one workexperience
hi @brunobuddy , is there any update to this? would love to have seeders like this, so that a coworker can start fresh with data that makes sense in context of the project.
@MURO⚡ We are currently working on a big release and we may go with that after that. I will let you know if you we progress into that
awesome ty!