Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Add db seeding functionality for development #67

Closed
spencern opened this issue Apr 23, 2018 · 2 comments
Closed

Add db seeding functionality for development #67

spencern opened this issue Apr 23, 2018 · 2 comments
Milestone

Comments

@spencern
Copy link
Contributor

spencern commented Apr 23, 2018

Create a new command seed that will seed the mongo database with fake products, orders, tags etc.

Currently, this functionality lives in https://github.com/reactioncommerce/reaction-devtools,

This issue is blocked by two issues:

  1. Removing the Meteor dependency from file-collections
  2. Abstracting the seeding functionality of devtools into an npm package: Migrate the db seeding functionality of devtools to an npm package reaction-devtools#18

This command may need to take a --dbport or similar flag to determine how to access the correct database.

Additional functionality could include passing a "size" flag (e.g. reaction seed --size large) or passing in specific parameters for different data sets - e.g. reaction seed --products 1000 --tags 200 --orders 5000 or something similar.

Questions

  1. Are there any major drawbacks to doing it this way?
  2. How else could we accomplish this functionality?
  3. Is this the correct place for this functionality or should it live in separate CLI command?

Acceptance criteria
I can run the following command to seed a mongo database with a default set of product data

reaction seed
@spencern spencern added this to the Conundrum milestone Apr 23, 2018
@spencern spencern modified the milestones: Conundrum, Democrat May 1, 2018
@spencern spencern modified the milestones: Democrat, Elbert May 15, 2018
@spencern
Copy link
Contributor Author

@jshimko suggests that we could export a mongo db with the seeded data as a temporary, easier solution.

@spencern spencern modified the milestones: Elbert, Fletcher May 29, 2018
@spencern spencern modified the milestones: Fletcher, Grays Jun 12, 2018
@spencern
Copy link
Contributor Author

@kieckhafer has created a data set that he will publish somewhere that contains a great set of starter data. Closing this issue in favor of that solution for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant