ISIL-ESTE / Student-Workflow-Organizer

The Workflow Organizer website helps students to organize their academic workload through features such as a dashboard, timeline, reminders, collaboration tools, resource library, progress tracking, and analytics. It also allows users to share and summarize courses and seek project help.
MIT License
47 stars 21 forks source link

Database Seeding Enhancement: Improving REST API Initialization #108

Open muttaqin1 opened 1 year ago

muttaqin1 commented 1 year ago

We propose an enhanced approach to seeding the database, ensuring the creation of essential seed data within our REST API's database. This would encompass tasks such as populating default user accounts, sample content, and configuration settings that are pivotal for a seamless application setup.

bellaabdelouahab commented 1 year ago

I agree on that because we already made two modules

it would be much better i we have a seed data

muttaqin1 commented 1 year ago

1)We can create a seed dir. Then we will add random json data files like userData.json, roleData.json. After that we will create function which will create records using those json data.

2)We have the functionality to create default users and roles.so we can create a function which will call those functions.

We have to delete those records after our job is done.

What do you think? @bellaabdelouahab

bellaabdelouahab commented 1 year ago

Sure i will get going with that @muttaqin1

bellaabdelouahab commented 1 year ago

hey, I'm facing a little problem

the default users credential are in .env file how should we solve that

@muttaqin1

muttaqin1 commented 1 year ago

hey, I'm facing a little problem

the default users credential are in .env file how should we solve that

@muttaqin1

The default user and default roles will be kept as it is. But we will add additional random datasets for every model. So all the developers can work using the same data.

muttaqin1 commented 1 year ago

@bellaabdelouahab

bellaabdelouahab commented 1 year ago

okay 👌 @muttaqin1