Add a fork relationship to the db seed #550

Closed
opened 2021-10-10 22:10:24 +02:00 by Irev-Dev · 1 comment
Irev-Dev commented 2021-10-10 22:10:24 +02:00 (Migrated from github.com)

Projects have a forking relation to each other in the DB, that is any project can refer to the a project it was forked from. however this relationship is not leverage in our seed data.

Edit app/api/db/seed.js to add a project that is "forked" from another to our seed data. For an example of how this is created see the function forkProject in app/api/src/services/projects/projects.ts.

For context the Primsa dosc might be useful and the schema that defines the forking relation ship is in app/api/db/schema.prisma

Follow the instructions in CONTRIBUTING.md but also running yarn rw prisma db seed and than checking the data created when running yarn rw prisma studio at http://localhost:5555/ is how you can check your work.


Follow the instructions in CONTRIBUTING.md to get setup, and of course ask for help here or in the dev-help discord channel.

If you'd like to contribute the CadHub but this issue is taken or you'd prefer something else, have a look at #535 to see if there's something else you would like

Projects have a forking relation to each other in the DB, that is any project can refer to the a project it was forked from. however this relationship is not leverage in our seed data. Edit `app/api/db/seed.js` to add a project that is "forked" from another to our seed data. For an example of how this is created see the function `forkProject` in `app/api/src/services/projects/projects.ts`. For context the [Primsa dosc](https://www.prisma.io/docs/) might be useful and the schema that defines the forking relation ship is in `app/api/db/schema.prisma` Follow the instructions in [CONTRIBUTING.md](https://github.com/Irev-Dev/cadhub/blob/main/CONTRIBUTING.md) but also running `yarn rw prisma db seed` and than checking the data created when running `yarn rw prisma studio` at http://localhost:5555/ is how you can check your work. ---- Follow the instructions in [CONTRIBUTING.md](https://github.com/Irev-Dev/cadhub/blob/main/CONTRIBUTING.md) to get setup, and of course ask for help here or in the [dev-help discord channel](https://discord.gg/Vgmky37UtD). If you'd like to contribute the CadHub but this issue is taken or you'd prefer something else, have a look at #535 to see if there's something else you would like
lucas-barros commented 2021-10-11 16:52:04 +02:00 (Migrated from github.com)

Hi @Irev-Dev! I would like to take this one, if that's ok

Hi @Irev-Dev! I would like to take this one, if that's ok
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: h3n3/cadhub#550