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

[Refactor] Utskott as DB table #255

Open
afroborg opened this issue Feb 7, 2023 · 1 comment
Open

[Refactor] Utskott as DB table #255

afroborg opened this issue Feb 7, 2023 · 1 comment
Assignees
Labels
drygt ny-funktion utökad-funktion En funktion som bygger vidare på en redan implementerad funktion

Comments

@afroborg
Copy link
Member

afroborg commented Feb 7, 2023

This should probably have been done from the beginning as this will be a lot of work...
BUT - I think it's a necessary thing to do.

We should move away from the hard coded utskott enum in graphql and store utskott in the DB as well as relations to their respective posts.

This would be an improvement for many reasons:

  1. No need to redeploy just to change a minor issue with naming etc.

I know this is not something we do often but it's still a pain to regenerate schemas etc. if an enum changes

  1. We could add a description field to the utskott column, so that "utskottsordförande" can edit their own description on the site.
  2. probably more reasons

My thinking is that it should have fields like:

  • id - pk
  • name - Ex. Informationsutskottet
  • abbreviation - Ex. InfU
  • shortDescription - A short description that summarizes the utskott
  • description or articleLink - Either we store the entire description, or we link it to an article that describes the utskott in more detail.
  • color? - Not sure about this, but could be a fun idea to let them decide their own utskott-color.
@afroborg afroborg added utökad-funktion En funktion som bygger vidare på en redan implementerad funktion ny-funktion drygt labels Feb 7, 2023
@ginger51011
Copy link
Member

Agreed. But yes, a bit of a pain. Would also make it possible to change things about NollU when desireable

Will most certanly need a DataLoader, but that's probably easy to add

@Muncherkin Muncherkin self-assigned this Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
drygt ny-funktion utökad-funktion En funktion som bygger vidare på en redan implementerad funktion
Projects
None yet
Development

No branches or pull requests

3 participants