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

Migrate the user.subscribedPodcastIds column to a new table with a relationship to users #572

Open
mitchdowney opened this issue Dec 23, 2022 · 0 comments
Labels
database enhancement New feature or request

Comments

@mitchdowney
Copy link
Member

Currently subscribedPodcastIds are saved as an id in an array in a json column on the User table. This is an overly simplistic implementation, and we could derive more benefits by migrating this to a separate table with a relationship to the User table.

This will require:

  1. creating a new table in the database.
  2. migrating existing data to the new table.
  3. updating the API to return the new table data whenever subscribedPodcastIds was returned previously.

Hopefully updating the client-side will not be necessary, by updating the existing endpoints to return the data from the new database schema.

https://github.com/podverse/podverse-api/blob/develop/src/entities/user.ts#L148

@mitchdowney mitchdowney added enhancement New feature or request database labels Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant