Skip to content
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 Seeds Script for Development Enviroment #105

Open
zacck-zz opened this issue Apr 25, 2018 · 8 comments
Open

Add Seeds Script for Development Enviroment #105

zacck-zz opened this issue Apr 25, 2018 · 8 comments

Comments

@zacck-zz
Copy link
Member

zacck-zz commented Apr 25, 2018

Expected Behavior

I think @zubairshokh you can help better with outlining this issue, but as per our conversation I would assume you are speaking about seeding the database so that the dev environement has dummy data for developers

Actual Behavior

We currently don't see the database dev environment

Acceptance Criteria

We should be able to seed the database as per environment and demand

Steps to Reproduce the Problem

  1. If you build the project in the dev environment it does not have any data

Specifications

  • Version: 0.0.3-rcwishlist
@zubairshokh
Copy link

yea, As of now, i do not see data to be supplied within the database, even for development.
So, i would recommend to use data Factory that puts the data in the tables, so that the working of the app gets a little flow.

@zacck-zz
Copy link
Member Author

@zubairshokh it would be awesome if we had a script that we could execute as a mix task, say something like mix seed development then the dev environment would be filled with some test data.
We are already using ex_machina to seed the database with test data we can potentially use ex_machina to do the development seed?

@zacck-zz
Copy link
Member Author

Here are the factories we use in the test env, you can likely repurpose them @zubairshokh

@zubairshokh
Copy link

zubairshokh commented Apr 25, 2018

yea, i saw them. they are for testing purpose. what i am saying is that use the same Exmachina, and Faker library to create the fake data for the tables. @zacck

@zacck-zz
Copy link
Member Author

I haven't used the faker library before but I am keen to see

@zubairshokh
Copy link

i will try to work on it this weekend.

@zacck-zz zacck-zz added this to the MoneyLog Planning milestone Apr 26, 2018
@zacck-zz
Copy link
Member Author

Hmm so I can see where this would be very helpful in development, At the moment I am working on some logic updates for the association of Wishlist Items to Log Sections and it sure would be nice to have some seeded data to play with

@zacck-zz
Copy link
Member Author

zacck-zz commented May 2, 2018

So I went through the application and checked what kind of seed data it would need, of course, this would have to be updated as the application is developed further but at the moment here is the data I think we need to load for dev testing

  • Insert 2 Account.User records
  • Insert 2 respective MoneyLog.Owner records and associate them with the above users
  • For each of these owners we should insert 2 MoneyLog.Budget records
  • For each of these budgets we should insert 2 Planning.LogSection records
  • For each of these budgets we should insert 5 WishList.Item records
  • Associate 2 items in each budget to logsectons

@zubairshokh I think this should work for now let me know what you think

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

No branches or pull requests

2 participants