Fixes for the postgres error: column play_freq does not exist#21
Merged
Fixes for the postgres error: column play_freq does not exist#21
Conversation
Drizzle orm doesn't handle column name aliasing in views correctly, so the column can't be named rotation
JacksonMeade
approved these changes
Jun 6, 2024
Contributor
JacksonMeade
left a comment
There was a problem hiding this comment.
Leaving an approving review because this appears to solve the issue if removing the view is assumed to do so, and its blocking. Let me know if you’d like support in developing that add to album backend code over slack.
Member
|
+1 |
Collaborator
Author
|
Sounds good! The view still exists, I just renamed the column to not use an alias. I'm not using the view within the flowsheet service though because of that separate $dynamic() issue. |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drizzle orm doesn't handle column name aliasing in views correctly, so the column can't be named 'rotation' instead it must be named 'play_freq'. I updated this and pushed the migration to the prod db.
I have also commented out logic that was making use of the view for now just to unblock the rest of the team as the $dynamic() queries do not work the we thought they did when we wrote the album plays feature.