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

#2829 stats page schema changes #2841

Merged
merged 4 commits into from
Oct 8, 2024

Conversation

wavehassman
Copy link
Contributor

@wavehassman wavehassman commented Sep 19, 2024

Changes

Added new models to the schema for the graphs, graph collections (essentially containers), and the necessary enums

Notes

had to add an id to model GraphData to create the relation

Checklist

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #2829

@wavehassman wavehassman marked this pull request as ready for review September 20, 2024 19:30
src/backend/src/prisma/schema.prisma Outdated Show resolved Hide resolved
src/backend/src/prisma/schema.prisma Outdated Show resolved Hide resolved
startDate DateTime
endDate DateTime
title String
linkId String @id @default(uuid())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the id for the graph?

src/backend/src/prisma/schema.prisma Outdated Show resolved Hide resolved
src/backend/src/prisma/schema.prisma Show resolved Hide resolved
src/backend/src/prisma/schema.prisma Outdated Show resolved Hide resolved
src/backend/src/prisma/schema.prisma Outdated Show resolved Hide resolved
src/backend/src/prisma/schema.prisma Outdated Show resolved Hide resolved
@@ -392,6 +425,8 @@ model Project {
car Car @relation(fields: [carId], references: [carId])
teams Team[] @relation(name: "assignedBy")
favoritedBy User[] @relation(name: "favoritedBy")
Graph Graph? @relation(fields: [graphLinkId], references: [linkId])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm a bit confused about the purpose of this field, but shouldn't it be a many to many relation?

src/backend/src/prisma/schema.prisma Outdated Show resolved Hide resolved
Copy link
Member

@walker-sean walker-sean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will probably need some changes down the line but this is a good to work with now

@walker-sean walker-sean merged commit 5b2660d into feature/stats-page Oct 8, 2024
4 checks passed
@walker-sean walker-sean deleted the #2829-stats-page-schema branch October 8, 2024 17:09
@martin0he martin0he linked an issue Oct 11, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Stats Page] - Schema
3 participants